4040 * An implementation of Map for JavaBeans which uses introspection to get and put properties in the bean.
4141 * <p>
4242 * If an exception occurs during attempts to get or set a property then the property is considered non existent in the Map
43- *
43+ * </p>
4444 */
4545public class BeanMap extends AbstractMap <Object , Object > implements Cloneable {
4646
@@ -90,7 +90,7 @@ public Object setValue(final Object value) {
9090 *
9191 * Private & unmodifiable replacement for the (public & static) defaultTransformers instance.
9292 */
93- private static final Map <Class <? extends Object >, Transformer > typeTransformers = Collections .unmodifiableMap (createTypeTransformers ());
93+ private static final Map <Class <?>, Transformer > typeTransformers = Collections .unmodifiableMap (createTypeTransformers ());
9494
9595 /**
9696 * This HashMap has been made unmodifiable to prevent issues when loaded in a shared ClassLoader environment.
@@ -163,8 +163,8 @@ public Collection values() {
163163 }
164164 };
165165
166- private static Map <Class <? extends Object >, Transformer > createTypeTransformers () {
167- final Map <Class <? extends Object >, Transformer > defaultTransformers = new HashMap <>();
166+ private static Map <Class <?>, Transformer > createTypeTransformers () {
167+ final Map <Class <?>, Transformer > defaultTransformers = new HashMap <>();
168168 defaultTransformers .put (Boolean .TYPE , input -> Boolean .valueOf (input .toString ()));
169169 defaultTransformers .put (Character .TYPE , input -> Character .valueOf (input .toString ().charAt (0 )));
170170 defaultTransformers .put (Byte .TYPE , input -> Byte .valueOf (input .toString ()));
@@ -184,7 +184,7 @@ private static Map<Class<? extends Object>, Transformer> createTypeTransformers(
184184
185185 // Constructors
186186
187- private transient HashMap <String , Class <? extends Object >> types = new HashMap <>();
187+ private transient HashMap <String , Class <?>> types = new HashMap <>();
188188
189189 /**
190190 * Constructs a new empty {@code BeanMap}.
@@ -214,7 +214,7 @@ public void clear() {
214214 if (bean == null ) {
215215 return ;
216216 }
217- Class <? extends Object > beanClass = null ;
217+ Class <?> beanClass = null ;
218218 try {
219219 beanClass = bean .getClass ();
220220 bean = beanClass .getConstructor ().newInstance ();
@@ -247,7 +247,7 @@ public Object clone() throws CloneNotSupportedException {
247247 return newMap ;
248248 }
249249 Object newBean = null ;
250- final Class <? extends Object > beanClass = bean .getClass (); // Cannot throw Exception
250+ final Class <?> beanClass = bean .getClass (); // Cannot throw Exception
251251 try {
252252 newBean = beanClass .getConstructor ().newInstance ();
253253 } catch (final Exception e ) {
@@ -364,9 +364,9 @@ protected Object convertType(final Class<?> newType, final Object value)
364364 protected Object [] createWriteMethodArguments (final Method method , Object value ) throws IllegalAccessException , ClassCastException {
365365 try {
366366 if (value != null ) {
367- final Class <? extends Object >[] types = method .getParameterTypes ();
367+ final Class <?>[] types = method .getParameterTypes ();
368368 if (types != null && types .length > 0 ) {
369- final Class <? extends Object > paramType = types [0 ];
369+ final Class <?> paramType = types [0 ];
370370 if (!paramType .isAssignableFrom (value .getClass ())) {
371371 value = convertType (paramType , value );
372372 }
@@ -548,7 +548,7 @@ private void initialise() {
548548 return ;
549549 }
550550
551- final Class <? extends Object > beanClass = getBean ().getClass ();
551+ final Class <?> beanClass = getBean ().getClass ();
552552 try {
553553 // BeanInfo beanInfo = Introspector.getBeanInfo( bean, null );
554554 final BeanInfo beanInfo = Introspector .getBeanInfo (beanClass );
@@ -559,7 +559,7 @@ private void initialise() {
559559 final String name = propertyDescriptor .getName ();
560560 final Method readMethod = propertyDescriptor .getReadMethod ();
561561 final Method writeMethod = propertyDescriptor .getWriteMethod ();
562- final Class <? extends Object > aType = propertyDescriptor .getPropertyType ();
562+ final Class <?> aType = propertyDescriptor .getPropertyType ();
563563
564564 if (readMethod != null ) {
565565 readMethods .put (name , readMethod );
0 commit comments