aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-08-12 22:18:58 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-08-12 22:18:58 +0200
commit5f4c415017c303f41469032f4bf9d801f6a3d397 (patch)
tree2120f2a3ae9f56cafc86c3e7505cd2bb195e816a
parent78223dacd372de8da186c7bdc828ee71ca7c5934 (diff)
downloadlombok-5f4c415017c303f41469032f4bf9d801f6a3d397.tar.gz
lombok-5f4c415017c303f41469032f4bf9d801f6a3d397.tar.bz2
lombok-5f4c415017c303f41469032f4bf9d801f6a3d397.zip
Added an extra check for non-standard javacs.
-rw-r--r--src/lombok/javac/apt/Processor.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lombok/javac/apt/Processor.java b/src/lombok/javac/apt/Processor.java
index 22daeab1..2d2d06d3 100644
--- a/src/lombok/javac/apt/Processor.java
+++ b/src/lombok/javac/apt/Processor.java
@@ -34,6 +34,7 @@ import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic.Kind;
import lombok.javac.HandlerLibrary;
import lombok.javac.JavacAST;
@@ -69,8 +70,10 @@ public class Processor extends AbstractProcessor {
/** {@inheritDoc} */
@Override public void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
- if ( !(processingEnv instanceof JavacProcessingEnvironment) ) this.processingEnv = null;
- else {
+ if ( !(processingEnv instanceof JavacProcessingEnvironment) ) {
+ processingEnv.getMessager().printMessage(Kind.WARNING, "You aren't using a compiler based around javac v1.6, so lombok will not work properly.");
+ this.processingEnv = null;
+ } else {
this.processingEnv = (JavacProcessingEnvironment) processingEnv;
handlers = HandlerLibrary.load(processingEnv.getMessager());
trees = Trees.instance(processingEnv);