aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/javac
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-09-03 02:40:49 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-09-03 02:40:49 +0200
commitbcf6f51cd35db683e5d2ab1b54016616e0869e95 (patch)
tree3222ad846a1cd1d6cff4167ba04a2c40a1d83bb8 /src/lombok/javac
parentd0116a8efe58c608b2001855d0cde92392ae9ca2 (diff)
downloadlombok-bcf6f51cd35db683e5d2ab1b54016616e0869e95.tar.gz
lombok-bcf6f51cd35db683e5d2ab1b54016616e0869e95.tar.bz2
lombok-bcf6f51cd35db683e5d2ab1b54016616e0869e95.zip
bugfix in the javac implementation of AnnotationValues.
Diffstat (limited to 'src/lombok/javac')
-rw-r--r--src/lombok/javac/Javac.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lombok/javac/Javac.java b/src/lombok/javac/Javac.java
index 60c86099..bc6d18f6 100644
--- a/src/lombok/javac/Javac.java
+++ b/src/lombok/javac/Javac.java
@@ -125,10 +125,12 @@ public class Javac {
values.put(name, new AnnotationValue(node, raws, guesses, isExplicit) {
@Override public void setError(String message, int valueIdx) {
- node.addError(message, positions.get(valueIdx));
+ if ( valueIdx < 0 ) node.addError(message);
+ else node.addError(message, positions.get(valueIdx));
}
@Override public void setWarning(String message, int valueIdx) {
- node.addWarning(message, positions.get(valueIdx));
+ if ( valueIdx < 0 ) node.addWarning(message);
+ else node.addWarning(message, positions.get(valueIdx));
}
});
}