diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/javac/apt/LombokProcessor.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/javac/apt/LombokProcessor.java b/src/core/lombok/javac/apt/LombokProcessor.java index 79db5dec..ed6cdb65 100644 --- a/src/core/lombok/javac/apt/LombokProcessor.java +++ b/src/core/lombok/javac/apt/LombokProcessor.java @@ -389,7 +389,12 @@ public class LombokProcessor extends AbstractProcessor { } private JCCompilationUnit toUnit(Element element) { - TreePath path = trees == null ? null : trees.getPath(element); + TreePath path = null; + if (trees != null) { + try { + path = trees.getPath(element); + } catch (NullPointerException ignore) {} + } if (path == null) return null; return (JCCompilationUnit) path.getCompilationUnit(); |