aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Praml <praml@foconis.de>2018-07-09 01:05:35 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-08-20 20:46:31 +0200
commit8151e710fc9add7232f2828bc069077d6eb1c457 (patch)
treef50ec85cdd1f717b4b0c6a7bb498401a3a50082a
parentc157e6537b4d96987879c4ca770f1e1ddf51fe56 (diff)
downloadlombok-8151e710fc9add7232f2828bc069077d6eb1c457.tar.gz
lombok-8151e710fc9add7232f2828bc069077d6eb1c457.tar.bz2
lombok-8151e710fc9add7232f2828bc069077d6eb1c457.zip
FIX: omit warning "Can't get the delegate of the gradle IncrementalProcessingEnvironment." in eclipse build.
-rw-r--r--src/core/lombok/core/AnnotationProcessor.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lombok/core/AnnotationProcessor.java b/src/core/lombok/core/AnnotationProcessor.java
index 89dfa555..d2efa87c 100644
--- a/src/core/lombok/core/AnnotationProcessor.java
+++ b/src/core/lombok/core/AnnotationProcessor.java
@@ -111,6 +111,9 @@ public class AnnotationProcessor extends AbstractProcessor {
}
@Override boolean want(ProcessingEnvironment procEnv, List<String> delayedWarnings) {
+ // do not run on ECJ as it may print warnings
+ if (procEnv.getClass().getName().startsWith("org.eclipse.jdt.")) return false;
+
ProcessingEnvironment javacProcEnv = getJavacProcessingEnvironment(procEnv, delayedWarnings);
if (javacProcEnv == null) return false;
@@ -210,7 +213,7 @@ public class AnnotationProcessor extends AbstractProcessor {
for (TypeElement elem : annotations) {
zeroElems = false;
Name n = elem.getQualifiedName();
- if (n.length() > 7 && n.subSequence(0, 7).toString().equals("lombok.")) continue;
+ if (n.toString().startsWith("lombok.")) continue;
onlyLombok = false;
}