@@ -574,7 +574,9 @@ public static void setValue(final Field field, final Object instance,
574574 // the given value needs to be converted to a compatible type
575575 final Type fieldType =
576576 GenericUtils .getFieldType (field , instance .getClass ());
577- compatibleValue = ConversionUtils .convert (value , fieldType );
577+ @ SuppressWarnings ("deprecation" )
578+ final Object convertedValue = ConversionUtils .convert (value , fieldType );
579+ compatibleValue = convertedValue ;
578580 }
579581 field .set (instance , compatibleValue );
580582 }
@@ -770,13 +772,17 @@ public static Type getGenericType(final Field field, final Class<?> type) {
770772 * Convenience class for a {@link CacheMap} that stores annotated
771773 * {@link Field}s.
772774 */
773- private static class FieldCache extends CacheMap <Field > {}
775+ private static class FieldCache extends CacheMap <Field > {
776+ // Trivial subclass to narrow generic params
777+ }
774778
775779 /**
776780 * Convenience class for a {@link CacheMap} that stores annotated
777781 * {@link Method}s.
778782 */
779- private static class MethodCache extends CacheMap <Method > {}
783+ private static class MethodCache extends CacheMap <Method > {
784+ // Trivial subclass to narrow generic params
785+ }
780786
781787 /**
782788 * Convenience class for {@code Map > Map > List} hierarchy. Cleans up
@@ -801,7 +807,7 @@ private static class CacheMap<T extends AnnotatedElement> extends
801807
802808 /**
803809 * @param c Base class of interest
804- * @param annotationClass {@link Annotation type within the base class
810+ * @param annotationClass {@link Annotation} type within the base class
805811 * @return A {@link List} of instances in the base class with the specified
806812 * {@link Annotation}, or null if a cached list does not exist.
807813 */
0 commit comments