diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-10-10 20:41:29 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-10-10 23:24:04 +0200 |
commit | 08961edcfeef9b181621351e36bbc267f9395415 (patch) | |
tree | 8aa4f4ae8e6af3247a547d01bb1dee5f8e66cdf4 /src/delombok/lombok | |
parent | 728dddbc81d9f9bfbbd3f8217b8c94f3f201c83d (diff) | |
download | lombok-08961edcfeef9b181621351e36bbc267f9395415.tar.gz lombok-08961edcfeef9b181621351e36bbc267f9395415.tar.bz2 lombok-08961edcfeef9b181621351e36bbc267f9395415.zip |
Whoops, Classload errors running lombok on javac with backing JVM 7 or below; fixed.
Diffstat (limited to 'src/delombok/lombok')
-rw-r--r-- | src/delombok/lombok/delombok/DocCommentIntegrator.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/delombok/lombok/delombok/DocCommentIntegrator.java b/src/delombok/lombok/delombok/DocCommentIntegrator.java index c1eb02b6..0955a003 100644 --- a/src/delombok/lombok/delombok/DocCommentIntegrator.java +++ b/src/delombok/lombok/delombok/DocCommentIntegrator.java @@ -66,7 +66,17 @@ public class DocCommentIntegrator { if (map_ instanceof Map) { ((Map<JCTree, String>) map_).put(node, docCommentContent); return true; - } else if (map_ instanceof DocCommentTable) { + } else if (Javac.instanceOfDocCommentTable(map_)) { + CommentAttacher_8.attach(node, docCommentContent, map_); + return true; + } + + return false; + } + + /* Container for code which will cause class loader exceptions on javac below 8. By being in a separate class, we avoid the problem. */ + private static class CommentAttacher_8 { + static void attach(final JCTree node, String docCommentContent, Object map_) { final String docCommentContent_ = docCommentContent; ((DocCommentTable) map_).putComment(node, new Comment() { @Override public String getText() { @@ -85,10 +95,7 @@ public class DocCommentIntegrator { return JavacHandlerUtil.nodeHasDeprecatedFlag(node); } }); - return true; } - - return false; } private JCTree findJavadocableNodeOnOrAfter(JCCompilationUnit unit, int endPos) { |