From cccbf94e72fcdfadcaad5800acc8f871e4ef3246 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Sun, 10 Oct 2010 18:34:48 +0000 Subject: [PATCH] Changing the StringBuilder to build around an empty String and not null, as null will cause an NPE. Reported by FindBugs git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1006333 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/lang3/AnnotationUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/lang3/AnnotationUtils.java b/src/main/java/org/apache/commons/lang3/AnnotationUtils.java index 9f0a9c92a..273ccae3b 100644 --- a/src/main/java/org/apache/commons/lang3/AnnotationUtils.java +++ b/src/main/java/org/apache/commons/lang3/AnnotationUtils.java @@ -59,7 +59,7 @@ public class AnnotationUtils { break; } } - return new StringBuilder(annotationType == null ? null : annotationType.getName()) + return new StringBuilder(annotationType == null ? "" : annotationType.getName()) .insert(0, '@').toString(); }