Hi ,
I am using JIRA rest client api for reading issues.
The problem i face is restClient is unable to close the connection when its invoked is there any bug.
I am using jira-rest-java-client-api-2.0.0-m31.jar
final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraUri, username, password); restClient.close(); // it doesnt close the session
Any help would be appreciated..
Thanks,
Community moderators have prevented the ability to post new answers.
Hi Azhar,
Try with a try-catch-finally block. An example:
final
AsynchronousJiraRestClientFactory factory=
new
AsynchronousJiraRestClientFactory();
final
JiraRestClient restClient=factory.createWithBasicHttpAuthentication(jiraUri, username, password);
}catch(Exception e){
e.printStackTrace();
}finally{
try {
restClient.close();
// it doesnt close the session
} catch (IOException e) {
e.printStackTrace();
}
}
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.