diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-08-14 23:26:10 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-08-14 23:26:10 +0200 |
commit | 7483dd4345351b29af3babacf036e6d7107489b7 (patch) | |
tree | db490658bfba0757a46d5c87ca0bb2ca83b8b13b /src/lombok/javac/apt | |
parent | fe945d91983c854e2c6e79e225761f48ffd04059 (diff) | |
download | lombok-7483dd4345351b29af3babacf036e6d7107489b7.tar.gz lombok-7483dd4345351b29af3babacf036e6d7107489b7.tar.bz2 lombok-7483dd4345351b29af3babacf036e6d7107489b7.zip |
The fix in previous commit has been verified, so the diagnostic messages have been removed.
Diffstat (limited to 'src/lombok/javac/apt')
-rw-r--r-- | src/lombok/javac/apt/Processor.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/lombok/javac/apt/Processor.java b/src/lombok/javac/apt/Processor.java index 0a5c2424..44edd917 100644 --- a/src/lombok/javac/apt/Processor.java +++ b/src/lombok/javac/apt/Processor.java @@ -147,16 +147,9 @@ public class Processor extends AbstractProcessor { } private JCCompilationUnit toUnit(Element element) { - TreePath path = trees.getPath(element); - if ( path != null ) return (JCCompilationUnit) path.getCompilationUnit(); - else { - if ( element == null ) { - processingEnv.getMessager().printMessage(Kind.WARNING, "LOMBOK DIAGNOSTIC: no TreePath returned for element, " + - "probably because element is null!"); - } - processingEnv.getMessager().printMessage(Kind.WARNING, "LOMBOK DIAGNOSTIC: no TreePath returned for element of type: " + - element.getClass() + "with toString: " + element); - return null; - } + TreePath path = trees == null ? null : trees.getPath(element); + if ( path == null ) return null; + + return (JCCompilationUnit) path.getCompilationUnit(); } } |