summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-12-28 22:57:53 -0800
committerGeorge Fraser <george@fivetran.com>2018-12-28 22:57:53 -0800
commit5754fe3246919fbe3ce2aa19535fe3925d06d3b0 (patch)
tree5f6015e6689ff14178c0a46547adb857eb06b7de /src
parentf640b8b6823f589edda758e5918612ef318e253e (diff)
downloadjava-language-server-5754fe3246919fbe3ce2aa19535fe3925d06d3b0.zip
Warn on class format errors
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/javacs/Classes.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/javacs/Classes.java b/src/main/java/org/javacs/Classes.java
index 6249070..6215759 100644
--- a/src/main/java/org/javacs/Classes.java
+++ b/src/main/java/org/javacs/Classes.java
@@ -152,7 +152,7 @@ class Classes {
try {
return Optional.of(ClassLoader.getPlatformClassLoader().loadClass(className));
- } catch (ClassNotFoundException | NoClassDefFoundError e) {
+ } catch (ClassNotFoundException | NoClassDefFoundError | ClassFormatError e) {
LOG.log(Level.WARNING, "Could not load " + className + ": " + e.getMessage());
loadError.add(className);
return Optional.empty();
@@ -195,7 +195,7 @@ class Classes {
try {
return Optional.of(classLoader.loadClass(className));
- } catch (ClassNotFoundException | NoClassDefFoundError e) {
+ } catch (ClassNotFoundException | NoClassDefFoundError | ClassFormatError e) {
LOG.log(Level.WARNING, "Could not load " + className + ": " + e.getMessage());
loadError.add(className);
return Optional.empty();