Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java
index 6063fd593..3faff38e0 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileContentManager.java
@@ -96,18 +96,15 @@ public class FileContentManager implements IFileContentManager {
if (!f.exists())
return false;
- try {
- DataInputStream input = new DataInputStream(new FileInputStream(f));
- try {
+ try (DataInputStream input = new DataInputStream(new FileInputStream(f))) {
map.putAll(readOldFormatExtensionMappings(input));
- } finally {
- input.close();
- f.delete();
- }
} catch (IOException ex) {
TeamPlugin.log(IStatus.ERROR, ex.getMessage(), ex);
return false;
+ } finally {
+ f.delete();
}
+
return true;
}

Back to the top