Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-11-25 00:20:11 +0000
committerSteffen Pingel2012-11-25 20:12:23 +0000
commit7095e262f77af86e380190b9c32ba145b7b2fc66 (patch)
treef45d6c0bf628293cb6bf08d41f16aa3acb5cd48b /org.eclipse.mylyn.bugzilla.core
parenta0a8c2a45b5e20512e273dbec52595bb3bb1b1be (diff)
downloadorg.eclipse.mylyn.tasks-7095e262f77af86e380190b9c32ba145b7b2fc66.tar.gz
org.eclipse.mylyn.tasks-7095e262f77af86e380190b9c32ba145b7b2fc66.tar.xz
org.eclipse.mylyn.tasks-7095e262f77af86e380190b9c32ba145b7b2fc66.zip
388897: fix connection leak when downloading attachment content
Change-Id: Ic924bbfc68ecb7b2047606586587beb1f424d8bd Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388897
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index ac0e8dfed..d11bc1f39 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -815,10 +815,9 @@ public class BugzillaClient {
public void getAttachmentData(String attachmentId, OutputStream out, IProgressMonitor monitor) throws IOException,
CoreException {
String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId;
- GetMethod method = connectInternal(url, false, monitor, null);//getConnectGzip(url, monitor);
+ GetMethod method = getConnect(url, monitor);//getConnectGzip(url, monitor);
try {
- int status = WebUtil.execute(httpClient, hostConfiguration, method, monitor);
- if (status == HttpStatus.SC_OK) {
+ if (method.getStatusCode() == HttpStatus.SC_OK) {
//copy the response
InputStream instream = method.getResponseBodyAsStream();
if (instream != null) {
@@ -831,8 +830,6 @@ public class BugzillaClient {
} else {
parseHtmlError(method.getResponseBodyAsStream());
}
- } catch (IOException e) {
- throw e;
} finally {
WebUtil.releaseConnection(method, monitor);
}

Back to the top