aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/Eclipse.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-09-03 02:25:51 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-09-03 02:25:51 +0200
commit0b30a5695022649c0e9288b167fe15893e06887b (patch)
tree0fdbf015db81cd86d2e01cd1c739a092cf07f74b /src/lombok/eclipse/Eclipse.java
parentcfa9bef58d15bea474b83b3ce80c06f5af814711 (diff)
downloadlombok-0b30a5695022649c0e9288b167fe15893e06887b.tar.gz
lombok-0b30a5695022649c0e9288b167fe15893e06887b.tar.bz2
lombok-0b30a5695022649c0e9288b167fe15893e06887b.zip
Fixed a problem in AnnotationValues where 'isExplicit' always returned true.
Diffstat (limited to 'src/lombok/eclipse/Eclipse.java')
-rw-r--r--src/lombok/eclipse/Eclipse.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lombok/eclipse/Eclipse.java b/src/lombok/eclipse/Eclipse.java
index 5a69fca9..c37d1e33 100644
--- a/src/lombok/eclipse/Eclipse.java
+++ b/src/lombok/eclipse/Eclipse.java
@@ -346,11 +346,13 @@ public class Eclipse {
if ( mName.equals(name) ) fullExpression = pair.value;
}
- if ( fullExpression != null ) {
+ boolean isExplicit = fullExpression != null;
+
+ if ( isExplicit ) {
if ( fullExpression instanceof ArrayInitializer ) {
expressions = ((ArrayInitializer)fullExpression).expressions;
} else expressions = new Expression[] { fullExpression };
- for ( Expression ex : expressions ) {
+ if ( expressions != null ) for ( Expression ex : expressions ) {
StringBuffer sb = new StringBuffer();
ex.print(0, sb);
raws.add(sb.toString());
@@ -361,7 +363,7 @@ public class Eclipse {
final Expression fullExpr = fullExpression;
final Expression[] exprs = expressions;
- values.put(name, new AnnotationValue(annotationNode, raws, guesses) {
+ values.put(name, new AnnotationValue(annotationNode, raws, guesses, isExplicit) {
@Override public void setError(String message, int valueIdx) {
Expression ex;
if ( valueIdx == -1 ) ex = fullExpr;