From 685075984b0fcc39e577be865df94446729c35b8 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Tue, 8 Mar 2011 16:24:00 +0000 Subject: [PATCH] Fix incorrect Javadoc re thrown exceptions; requires further change to private method git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1079417 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/lang3/AnnotationUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/AnnotationUtils.java b/src/main/java/org/apache/commons/lang3/AnnotationUtils.java index 08cb5a00b..431ead1bb 100644 --- a/src/main/java/org/apache/commons/lang3/AnnotationUtils.java +++ b/src/main/java/org/apache/commons/lang3/AnnotationUtils.java @@ -152,8 +152,9 @@ && isValidAnnotationMemberType(m.getReturnType())) { * * @param a the Annotation for a hash code calculation is desired, not null * @return the calculated hash code - * @throws IllegalAccessException if thrown during annotation access - * @throws InvocationTargetException if thrown during annotation access + * @throws RuntimeException if IllegalAccessException or InvocationTargetException + * or any other Exception is thrown during annotation access + * @throws IllegalStateException if an annotation method invocation returns {@code null} */ public static int hashCode(Annotation a) { int result = 0; @@ -221,8 +222,7 @@ public static boolean isValidAnnotationMemberType(Class type) { } //besides modularity, this has the advantage of autoboxing primitives: - private static int hashMember(String name, Object value) - throws IllegalAccessException, InvocationTargetException { + private static int hashMember(String name, Object value) { int part1 = name.hashCode() * 127; if (value.getClass().isArray()) { return part1 ^ arrayMemberHash(value.getClass().getComponentType(), value);