diff options
Diffstat (limited to 'src/utils/lombok/javac/java6/CommentCollectingParserFactory.java')
-rw-r--r-- | src/utils/lombok/javac/java6/CommentCollectingParserFactory.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/lombok/javac/java6/CommentCollectingParserFactory.java b/src/utils/lombok/javac/java6/CommentCollectingParserFactory.java index 0cf8fdcd..5d96f9d1 100644 --- a/src/utils/lombok/javac/java6/CommentCollectingParserFactory.java +++ b/src/utils/lombok/javac/java6/CommentCollectingParserFactory.java @@ -28,6 +28,8 @@ import com.sun.tools.javac.parser.Lexer; import com.sun.tools.javac.parser.Parser; import com.sun.tools.javac.util.Context; +import lombok.permit.Permit; + public class CommentCollectingParserFactory extends Parser.Factory { static Context.Key<Parser.Factory> key() { return parserFactoryKey; @@ -49,8 +51,7 @@ public class CommentCollectingParserFactory extends Parser.Factory { context.put(CommentCollectingParserFactory.key(), (Parser.Factory)null); Field field; try { - field = JavaCompiler.class.getDeclaredField("parserFactory"); - field.setAccessible(true); + field = Permit.getField(JavaCompiler.class, "parserFactory"); field.set(compiler, new CommentCollectingParserFactory(context)); } catch (Exception e) { throw new IllegalStateException("Could not set comment sensitive parser in the compiler", e); |