Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-04-09 11:06:21 +0000
committerLars Vogel2021-04-09 17:52:00 +0000
commit04b0e24e720518a05625236c3dec10e94e57e8f9 (patch)
tree6a404552fc3f27a966ab50ee999c6623738f2488
parentf3688636b49e616f47d5cde4934cff675630ca0a (diff)
downloadeclipse.platform.team-04b0e24e720518a05625236c3dec10e94e57e8f9.tar.gz
eclipse.platform.team-04b0e24e720518a05625236c3dec10e94e57e8f9.tar.xz
eclipse.platform.team-04b0e24e720518a05625236c3dec10e94e57e8f9.zip
Manually adjusted the JDT cleanup as the try in a try block looked unnecessary. Change-Id: If193933cf8396993ab29c6ba87b268b8587e2300 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-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