Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/CustomTransitionManager.java10
1 files changed, 9 insertions, 1 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;

Back to the top