diff options
author | Andrey Loskutov | 2020-04-28 09:54:43 +0000 |
---|---|---|
committer | Andrey Loskutov | 2020-04-28 18:54:28 +0000 |
commit | 6f048d1aab26bf3060aa31484e70a37fde4c5db6 (patch) | |
tree | 69f75c3051eade44daa08ffcb462796ec5add0c8 /org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler | |
parent | 07b721bc3b658abcda3447c183f4433b52376df5 (diff) | |
download | eclipse.jdt.core-6f048d1aab26bf3060aa31484e70a37fde4c5db6.tar.gz eclipse.jdt.core-6f048d1aab26bf3060aa31484e70a37fde4c5db6.tar.xz eclipse.jdt.core-6f048d1aab26bf3060aa31484e70a37fde4c5db6.zip |
Bug 562559 - avoid declaring ClassFormatException if not needed
JrtUtilorg.getClassfileContent(File, String, String) declares that it
can throw ClassFormatException but it is actually doesn't and so many
clients have catch blocks it without ever need them.
Change-Id: I7fa4bed3dd145b16e0d2ea0adffb2dc5870992f0
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler')
-rw-r--r-- | org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/JrtFileSystem.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/JrtFileSystem.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/JrtFileSystem.java index 4c40eaa295..b22b97a203 100644 --- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/JrtFileSystem.java +++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/JrtFileSystem.java @@ -171,14 +171,9 @@ public class JrtFileSystem extends Archive { */ @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { - try { - return Util.getCharContents(this, ignoreEncodingErrors, - org.eclipse.jdt.internal.compiler.util.JRTUtil.getClassfileContent(this.file, this.entryName, this.module), - this.charset.name()); - } catch (ClassFormatException e) { - e.printStackTrace(); - return null; - } + return Util.getCharContents(this, ignoreEncodingErrors, + org.eclipse.jdt.internal.compiler.util.JRTUtil.getClassfileContent(this.file, this.entryName, this.module), + this.charset.name()); } /* (non-Javadoc) |