我正在尝试获取 JIRA 问题的附件。但是 getAttachments() 方法返回 null。JIRA 版本为 v6.1.4
下面是代码
final JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
final URI jiraServerUri = new URI("http://XXX-jira.YYY.com");
final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, "XXXX", "YYYY");
//final NullProgressMonitor pm = new NullProgressMonitor();
final Issue issue = restClient.getIssueClient().getIssue("XXX-35238").claim();
System.out.println(issue);
System.out.println(issue.getAttachments());
以下是maven依赖项
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>2.0.0-m2</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>2.0.0-m25</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-plugin</artifactId>
<version>2.0.0-m25</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>2.0.0-m25</version>
</dependency>
非常感谢您的帮助。