From 1b0d0ff5ad539f34fc27a8a27621b3f8d6d982b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 18 Oct 2009 15:12:41 +0200 Subject: Configured warnings and solved some. --- src/lombok/core/AST.java | 3 +-- src/lombok/core/AnnotationValues.java | 21 +++++++++++---------- src/lombok/core/LombokNode.java | 8 ++++---- src/lombok/core/SpiLoadUtil.java | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/lombok/core') diff --git a/src/lombok/core/AST.java b/src/lombok/core/AST.java index 31b8f0fd..b1b5f3be 100644 --- a/src/lombok/core/AST.java +++ b/src/lombok/core/AST.java @@ -210,9 +210,8 @@ public abstract class AST, L extends LombokNode, if (type instanceof ParameterizedType) { Type component = ((ParameterizedType)type).getActualTypeArguments()[0]; return component instanceof Class ? (Class)component : Object.class; - } else { - return Object.class; } + return Object.class; } /** 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 { 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; diff --git a/src/lombok/core/LombokNode.java b/src/lombok/core/LombokNode.java index e4712313..c8ee4c00 100644 --- a/src/lombok/core/LombokNode.java +++ b/src/lombok/core/LombokNode.java @@ -125,8 +125,8 @@ public abstract class LombokNode, L extends LombokNode, L extends LombokNode