From 595a3041a01602d9a28aefe71bad021353900253 Mon Sep 17 00:00:00 2001 From: Takuya Murakami Date: Wed, 21 Mar 2018 11:40:47 +0900 Subject: [fix] Fix intellij build with jdk10 (#1572) Add a JavaFileManager class name to KNOWN_JAVA9_FILE_MANAGERS. --- src/core/lombok/javac/apt/LombokFileObjects.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java index 7184629f..f74c7d22 100644 --- a/src/core/lombok/javac/apt/LombokFileObjects.java +++ b/src/core/lombok/javac/apt/LombokFileObjects.java @@ -106,7 +106,8 @@ final class LombokFileObjects { "com.google.devtools.build.buildjar.javac.BlazeJavacMain$ClassloaderMaskingFileManager", "com.google.devtools.build.java.turbine.javac.JavacTurbineCompiler$ClassloaderMaskingFileManager", "org.netbeans.modules.java.source.parsing.ProxyFileManager", - "com.sun.tools.javac.api.ClientCodeWrapper$WrappedStandardJavaFileManager" + "com.sun.tools.javac.api.ClientCodeWrapper$WrappedStandardJavaFileManager", + "com.sun.tools.javac.main.DelegatingJavaFileManager$DelegatingSJFM" // IntelliJ + JDK10 ); static Compiler getCompiler(JavaFileManager jfm) { -- cgit From 3e0cdf5dc2119dcf860fb9effabc89523dee3975 Mon Sep 17 00:00:00 2001 From: Takuya Murakami Date: Sat, 24 Mar 2018 16:31:05 +0900 Subject: improve compiler detection for jdk9 later. --- src/core/lombok/javac/apt/LombokFileObjects.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java index f74c7d22..aba10540 100644 --- a/src/core/lombok/javac/apt/LombokFileObjects.java +++ b/src/core/lombok/javac/apt/LombokFileObjects.java @@ -130,6 +130,10 @@ final class LombokFileObjects { } catch (Throwable e) {} } + try { + if (Class.forName("com.sun.tools.javac.file.PathFileObject") == null) throw new NullPointerException(); + return new Java9Compiler(jfm); + } catch (Throwable e) {} try { if (Class.forName("com.sun.tools.javac.file.BaseFileObject") == null) throw new NullPointerException(); return Compiler.JAVAC7; -- cgit