mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 10:15:22 +00:00
jdk9: ongoing debugging information for errorprone
This commit is contained in:
1 parent
a5d5ac8c13
commit
923948f3b5
1 file changed
+10
-3
@@ -24,6 +24,7 @@ package lombok.javac.apt;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@@ -31,10 +32,10 @@ import javax.tools.JavaFileManager;
|
||||
import javax.tools.JavaFileObject;
|
||||
import javax.tools.JavaFileObject.Kind;
|
||||
|
||||
import com.sun.tools.javac.file.BaseFileManager;
|
||||
|
||||
import lombok.core.DiagnosticsReceiver;
|
||||
|
||||
import com.sun.tools.javac.file.BaseFileManager;
|
||||
|
||||
//Can't use SimpleJavaFileObject so we copy/paste most of its content here, because javac doesn't follow the interface,
|
||||
//and casts to its own BaseFileObject type. D'oh!
|
||||
final class LombokFileObjects {
|
||||
@@ -148,7 +149,13 @@ final class LombokFileObjects {
|
||||
if (uri.getScheme() == null) {
|
||||
uri = URI.create("file://" + uri);
|
||||
}
|
||||
return new Javac9BaseFileObjectWrapper(fileManager, Paths.get(uri), fileObject);
|
||||
Path path;
|
||||
try {
|
||||
path = Paths.get(uri);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new IllegalArgumentException("Problems in URI '" + uri + "' (" + fileObject.toUri() + ")", e);
|
||||
}
|
||||
return new Javac9BaseFileObjectWrapper(fileManager, path, fileObject);
|
||||
}
|
||||
|
||||
@Override public Method getDecoderMethod() {
|
||||
|
||||
Reference in new issue
Block a user