mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 08:15:48 +00:00
Merge pull request #3825 from snjeza/issue-3824
Fix RuntimeException in Javac$JavadocOps
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package com.sun.tools.javac.parser;
|
||||
|
||||
import com.sun.tools.javac.util.JCDiagnostic;
|
||||
|
||||
public class Tokens {
|
||||
public static class Token {
|
||||
public int pos;
|
||||
@@ -12,6 +14,8 @@ public class Tokens {
|
||||
|
||||
String getText();
|
||||
|
||||
JCDiagnostic.DiagnosticPosition getPos();
|
||||
|
||||
int getSourcePos(int index);
|
||||
|
||||
CommentStyle getStyle();
|
||||
|
||||
@@ -55,6 +55,7 @@ import com.sun.tools.javac.tree.JCTree.JCIdent;
|
||||
import com.sun.tools.javac.tree.JCTree.JCImport;
|
||||
import com.sun.tools.javac.tree.JCTree.JCLiteral;
|
||||
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
|
||||
import com.sun.tools.javac.tree.TreeInfo;
|
||||
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
|
||||
|
||||
import lombok.core.ClassLiteral;
|
||||
@@ -382,6 +383,10 @@ public class Javac {
|
||||
@Override public boolean isDeprecated() {
|
||||
return text.contains("@deprecated") && field instanceof JCVariableDecl && isFieldDeprecated(field);
|
||||
}
|
||||
|
||||
@Override public DiagnosticPosition getPos() {
|
||||
return field;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -417,7 +422,7 @@ public class Javac {
|
||||
throw sneakyThrow(e.getCause());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void storeEnd(JCTree tree, int pos, JCCompilationUnit top) {
|
||||
try {
|
||||
Object endPositions = JCCOMPILATIONUNIT_ENDPOSITIONS.get(top);
|
||||
|
||||
Reference in new issue
Block a user