From 0b30a5695022649c0e9288b167fe15893e06887b Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 3 Sep 2009 02:25:51 +0200 Subject: Fixed a problem in AnnotationValues where 'isExplicit' always returned true. --- src/lombok/eclipse/Eclipse.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lombok/eclipse/Eclipse.java') 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; -- cgit