jdk9: ongoing debugging information for errorprone

This commit is contained in:
Roel Spilker committed 2017-06-12 23:58:11 +02:00
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() {