aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-03-27 21:26:43 +0200
committerGitHub <noreply@github.com>2018-03-27 21:26:43 +0200
commit6a94e55e127b671a814d4df6211ec57f40e0c39f (patch)
tree59a15268ee7a8c67a4d8d04a6d5ac3a7d10eb1a2 /src/core
parent2a55bfa0bd0949dfc1ee6f46c27052f669234053 (diff)
parent3e0cdf5dc2119dcf860fb9effabc89523dee3975 (diff)
downloadlombok-6a94e55e127b671a814d4df6211ec57f40e0c39f.tar.gz
lombok-6a94e55e127b671a814d4df6211ec57f40e0c39f.tar.bz2
lombok-6a94e55e127b671a814d4df6211ec57f40e0c39f.zip
Merge pull request #1620 from tmurakam/feautre/1572-intellij-jdk10
[fix] Fix intellij build with jdk10 (#1572)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/apt/LombokFileObjects.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java
index 7184629f..aba10540 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) {
@@ -130,6 +131,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;
} catch (Throwable e) {}