diff options
author | Frank Becker | 2013-01-30 18:09:14 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-04-24 19:01:49 +0000 |
commit | d4790d2b871b85fc4bc19c2bffab7ff5b7598c3b (patch) | |
tree | d4f9f2ef529333b3ead7a9f6aba2b7c85ef06912 /org.eclipse.mylyn.bugzilla.core/src | |
parent | 7627c6238dbfbc112cfd78c02c41979d3a70c699 (diff) | |
download | org.eclipse.mylyn.tasks-d4790d2b871b85fc4bc19c2bffab7ff5b7598c3b.tar.gz org.eclipse.mylyn.tasks-d4790d2b871b85fc4bc19c2bffab7ff5b7598c3b.tar.xz org.eclipse.mylyn.tasks-d4790d2b871b85fc4bc19c2bffab7ff5b7598c3b.zip |
399302: reduce the number of warnings for all Tasks plugins
Change-Id: I1d847f36aa28feae51a8b71b048d6111fa155df5
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399302
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src')
2 files changed, 12 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java index ddd34110e..48023040f 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java @@ -102,10 +102,11 @@ public class CustomTransitionManager implements Serializable { return isValid(); } + BufferedReader br = null; try { - BufferedReader br = new BufferedReader(new FileReader(file)); String s; boolean checkOptions = true; + br = new BufferedReader(new FileReader(file)); while ((s = br.readLine()) != null && isValid()) { if (s.equals("<transitions>")) { //$NON-NLS-1$ @@ -125,6 +126,13 @@ public class CustomTransitionManager implements Serializable { setValid(false); throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 1, "Error parsing transition description file.\n\n" + e.getMessage(), e)); //$NON-NLS-1$ + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + } + } } return valid; diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/service/BugzillaXmlRpcClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/service/BugzillaXmlRpcClient.java index d36957602..af2d235a7 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/service/BugzillaXmlRpcClient.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/service/BugzillaXmlRpcClient.java @@ -129,8 +129,6 @@ public class BugzillaXmlRpcClient extends CommonXmlRpcClient { public static final String XML_RESPONSE_BUGS = "bugs"; //$NON-NLS-1$ - private static final String Date = null; - /* * Fields * @@ -860,7 +858,7 @@ public class BugzillaXmlRpcClient extends CommonXmlRpcClient { attachmentMapper.setPatch(is_patch.equals("1")); //$NON-NLS-1$ attachmentMapper.applyTo(attachmentAttribute); - addFlags(taskData, attachment.get("flags"), attachmentAttribute); + addFlags(taskData, attachment.get("flags"), attachmentAttribute); //$NON-NLS-1$ } } } @@ -888,7 +886,7 @@ public class BugzillaXmlRpcClient extends CommonXmlRpcClient { idAttribute.setValue(commentID.toString()); if (useIsPrivate) { TaskAttribute isprivateAttribute = description.createAttribute(IBugzillaConstants.BUGZILLA_DESCRIPTION_IS_PRIVATE); - isprivateAttribute.setValue(is_private ? "1" : "0"); + isprivateAttribute.setValue(is_private ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$ } } commentNum++; @@ -1082,7 +1080,7 @@ public class BugzillaXmlRpcClient extends CommonXmlRpcClient { } for (TaskAttribute attachment : taskAttachments) { BugzillaAttachmentMapper attachmentMapper = BugzillaAttachmentMapper.createFrom(attachment); - attachmentMapper.setUrl(repURL.substring(0, repURL.indexOf("/xmlrpc.cgi")) + attachmentMapper.setUrl(repURL.substring(0, repURL.indexOf("/xmlrpc.cgi")) //$NON-NLS-1$ + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX + attachmentMapper.getAttachmentId()); attachmentMapper.applyTo(attachment); } |