aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2017-05-08 22:21:05 +0200
committerRoel Spilker <r.spilker@gmail.com>2017-05-08 22:21:20 +0200
commit539b2a767f604dd561a7da09ae26114e8cfc065a (patch)
tree006cbe8ffad9284b3eee491b818f9de717376d9f /src/core/lombok/javac
parenta411a11193bdb49d00c7936ae110165995fa66de (diff)
downloadlombok-539b2a767f604dd561a7da09ae26114e8cfc065a.tar.gz
lombok-539b2a767f604dd561a7da09ae26114e8cfc065a.tar.bz2
lombok-539b2a767f604dd561a7da09ae26114e8cfc065a.zip
[jdk9] added debugging information for when we cannot determine the compiler
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/apt/LombokFileObjects.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java
index 7e818cab..cdb36f7e 100644
--- a/src/core/lombok/javac/apt/LombokFileObjects.java
+++ b/src/core/lombok/javac/apt/LombokFileObjects.java
@@ -116,7 +116,15 @@ final class LombokFileObjects {
if (Class.forName("com.sun.tools.javac.util.BaseFileObject") == null) throw new NullPointerException();
return Compiler.JAVAC6;
} catch (Exception e) {}
- return null;
+
+ StringBuilder sb = new StringBuilder(jfmClassName);
+ if (jfm != null) {
+ sb.append(" extends ").append(jfm.getClass().getSuperclass().getName());
+ for (Class<?> cls : jfm.getClass().getInterfaces()) {
+ sb.append(" implements ").append(cls.getName());
+ }
+ }
+ throw new IllegalArgumentException(sb.toString());
}
static JavaFileObject createEmpty(Compiler compiler, String name, Kind kind) {