aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/core/AnnotationValues.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/lombok/core/AnnotationValues.java')
-rw-r--r--src/lombok/core/AnnotationValues.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lombok/core/AnnotationValues.java b/src/lombok/core/AnnotationValues.java
index 8912ccd8..0408de85 100644
--- a/src/lombok/core/AnnotationValues.java
+++ b/src/lombok/core/AnnotationValues.java
@@ -202,18 +202,19 @@ public class AnnotationValues<A extends Annotation> {
Object defaultValue = method.getDefaultValue();
if (defaultValue == null) throw makeNoDefaultFail(v, method);
return defaultValue;
- } else return result;
- } else {
- if (result == null) {
- if (v.valueGuesses.size() == 1) {
- Object defaultValue = method.getDefaultValue();
- if (defaultValue == null) throw makeNoDefaultFail(v, method);
- return defaultValue;
- } else throw new AnnotationValueDecodeFail(v,
- "I can't make sense of this annotation value. Try using a fully qualified literal.", idx);
}
- Array.set(array, idx++, result);
+ return result;
+ }
+ if (result == null) {
+ if (v.valueGuesses.size() == 1) {
+ Object defaultValue = method.getDefaultValue();
+ if (defaultValue == null) throw makeNoDefaultFail(v, method);
+ return defaultValue;
+ }
+ throw new AnnotationValueDecodeFail(v,
+ "I can't make sense of this annotation value. Try using a fully qualified literal.", idx);
}
+ Array.set(array, idx++, result);
}
return array;