@@ -105,7 +105,7 @@ private AnnotationType(final Class<? extends Annotation> annotationClass) {
105105 for (Method method : methods ) {
106106 String name = method .getName ();
107107 Class <?> type = method .getReturnType ();
108- memberTypes .put (name , invocationHandlerReturnType (type ));
108+ memberTypes .put (name , type ); // invocationHandlerReturnType(type));
109109 members .put (name , method );
110110
111111 Object defaultValue = method .getDefaultValue ();
@@ -142,23 +142,24 @@ private AnnotationType(final Class<? extends Annotation> annotationClass) {
142142 * for an annotation).
143143 */
144144 public static Class <?> invocationHandlerReturnType (Class <?> type ) {
145+ // No! That is not how it works.
145146 // Translate primitives to wrappers
146- if (type == byte .class )
147- return Byte .class ;
148- if (type == char .class )
149- return Character .class ;
150- if (type == double .class )
151- return Double .class ;
152- if (type == float .class )
153- return Float .class ;
154- if (type == int .class )
155- return Integer .class ;
156- if (type == long .class )
157- return Long .class ;
158- if (type == short .class )
159- return Short .class ;
160- if (type == boolean .class )
161- return Boolean .class ;
147+ // if (type == byte.class)
148+ // return Byte.class;
149+ // if (type == char.class)
150+ // return Character.class;
151+ // if (type == double.class)
152+ // return Double.class;
153+ // if (type == float.class)
154+ // return Float.class;
155+ // if (type == int.class)
156+ // return Integer.class;
157+ // if (type == long.class)
158+ // return Long.class;
159+ // if (type == short.class)
160+ // return Short.class;
161+ // if (type == boolean.class)
162+ // return Boolean.class;
162163
163164 // Otherwise, just return declared type
164165 return type ;
0 commit comments