diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-03-24 19:14:10 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-05-23 21:25:30 +0200 |
commit | 4152eee126bcb6a0403d3e7a79fe336944031268 (patch) | |
tree | a255c5d4815752ca2a31c1e9eba7dd1a888b2f34 /src/utils/lombok/javac/CommentCatcher.java | |
parent | ffb3527daa05c966f40cccb3bbd93133b5775c7b (diff) | |
download | lombok-4152eee126bcb6a0403d3e7a79fe336944031268.tar.gz lombok-4152eee126bcb6a0403d3e7a79fe336944031268.tar.bz2 lombok-4152eee126bcb6a0403d3e7a79fe336944031268.zip |
Added a method to obtain latest java language spec supported by host
platform and implemented it for javac BUT NOT FOR ECJ!
Diffstat (limited to 'src/utils/lombok/javac/CommentCatcher.java')
-rw-r--r-- | src/utils/lombok/javac/CommentCatcher.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/lombok/javac/CommentCatcher.java b/src/utils/lombok/javac/CommentCatcher.java index 474dc43d..2825cd30 100644 --- a/src/utils/lombok/javac/CommentCatcher.java +++ b/src/utils/lombok/javac/CommentCatcher.java @@ -62,7 +62,7 @@ public class CommentCatcher { private static void registerCommentsCollectingScannerFactory(Context context) { try { - if (JavaCompiler.version().startsWith("1.6")) { + if (Javac.getJavaCompilerVersion() <= 6) { Class.forName("lombok.javac.java6.CommentCollectingScannerFactory").getMethod("preRegister", Context.class).invoke(null, context); } else { Class.forName("lombok.javac.java7.CommentCollectingScannerFactory").getMethod("preRegister", Context.class).invoke(null, context); @@ -76,7 +76,7 @@ public class CommentCatcher { private static void setInCompiler(JavaCompiler compiler, Context context, Map<JCCompilationUnit, List<CommentInfo>> commentsMap) { try { - if (JavaCompiler.version().startsWith("1.6")) { + if (Javac.getJavaCompilerVersion() <= 6) { Class<?> parserFactory = Class.forName("lombok.javac.java6.CommentCollectingParserFactory"); parserFactory.getMethod("setInCompiler",JavaCompiler.class, Context.class, Map.class).invoke(null, compiler, context, commentsMap); } else { |