aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/javac/JavacAST.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lombok/javac/JavacAST.java b/src/core/lombok/javac/JavacAST.java
index b3e8930e..f58de60f 100644
--- a/src/core/lombok/javac/JavacAST.java
+++ b/src/core/lombok/javac/JavacAST.java
@@ -174,7 +174,14 @@ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> {
if (sbtMappedVirtualFileRootsField == null) return null;
String encodedPath = (String) sbtMappedVirtualFilePathField.get(mappedVirtualFile);
- if (!encodedPath.startsWith("${")) return null;
+ if (!encodedPath.startsWith("${")) {
+ File maybeAbsoluteFile = new File(encodedPath);
+ if (maybeAbsoluteFile.exists()) {
+ return maybeAbsoluteFile.toURI();
+ } else {
+ return null;
+ }
+ }
int idx = encodedPath.indexOf('}');
if (idx == -1) return null;
String base = encodedPath.substring(2, idx);