mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 22:17:41 +00:00
bugfix: Detecting javac6 didn't work on soylatte; now it does.
This commit is contained in:
1 parent
1be7da7601
commit
b31ca9606b
1 file changed
+2
-1
@@ -63,7 +63,7 @@ final class LombokFileObjects {
|
||||
@Override public Method getDecoderMethod() {
|
||||
synchronized (decoderIsSet) {
|
||||
if (decoderIsSet.get()) return decoderMethod;
|
||||
decoderMethod = getDecoderMethod("com.sun.tools.javac.util.BaseFileObject");
|
||||
decoderMethod = getDecoderMethod("com.sun.tools.javac.file.BaseFileObject");
|
||||
decoderIsSet.set(true);
|
||||
return decoderMethod;
|
||||
}
|
||||
@@ -92,6 +92,7 @@ final class LombokFileObjects {
|
||||
static Compiler getCompiler(JavaFileManager jfm) {
|
||||
String jfmClassName = jfm != null ? jfm.getClass().getName() : "null";
|
||||
if (jfmClassName.equals("com.sun.tools.javac.util.DefaultFileManager")) return Compiler.JAVAC6;
|
||||
if (jfmClassName.equals("com.sun.tools.javac.util.JavacFileManager")) return Compiler.JAVAC6;
|
||||
if (jfmClassName.equals("com.sun.tools.javac.file.JavacFileManager")) return Compiler.JAVAC7;
|
||||
try {
|
||||
if (Class.forName("com.sun.tools.javac.file.BaseFileObject") == null) throw new NullPointerException();
|
||||
|
||||
Reference in new issue
Block a user