Skip to content

Commit bf350d5

Browse files
committed
Remove redundant extends in generics
1 parent fc2b80b commit bf350d5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/main/java/org/apache/commons/beanutils2/BeanMap.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public Object setValue(final Object value) {
9494
*
9595
* Private & unmodifiable replacement for the (public & static) defaultTransformers instance.
9696
*/
97-
private static final Map<Class<? extends Object>, Function<?, ?>> typeTransformers = Collections.unmodifiableMap(createTypeTransformers());
97+
private static final Map<Class<?>, Function<?, ?>> typeTransformers = Collections.unmodifiableMap(createTypeTransformers());
9898

99-
private static Map<Class<? extends Object>, Function<?, ?>> createTypeTransformers() {
100-
final Map<Class<? extends Object>, Function<?, ?>> defTransformers = new HashMap<>();
99+
private static Map<Class<?>, Function<?, ?>> createTypeTransformers() {
100+
final Map<Class<?>, Function<?, ?>> defTransformers = new HashMap<>();
101101
defTransformers.put(Boolean.TYPE, input -> Boolean.valueOf(input.toString()));
102102
defTransformers.put(Character.TYPE, input -> Character.valueOf(input.toString().charAt(0)));
103103
defTransformers.put(Byte.TYPE, input -> Byte.valueOf(input.toString()));
@@ -115,7 +115,7 @@ public Object setValue(final Object value) {
115115

116116
private final transient HashMap<String, Method> writeMethods = new HashMap<>();
117117

118-
private final transient HashMap<String, Class<? extends Object>> types = new HashMap<>();
118+
private final transient HashMap<String, Class<?>> types = new HashMap<>();
119119

120120
/**
121121
* Constructs a new empty {@code BeanMap}.
@@ -145,7 +145,7 @@ public void clear() {
145145
if (bean == null) {
146146
return;
147147
}
148-
Class<? extends Object> beanClass = null;
148+
Class<?> beanClass = null;
149149
try {
150150
beanClass = bean.getClass();
151151
bean = beanClass.newInstance();
@@ -178,7 +178,7 @@ public Object clone() throws CloneNotSupportedException {
178178
return newMap;
179179
}
180180
Object newBean = null;
181-
final Class<? extends Object> beanClass = bean.getClass(); // Cannot throw Exception
181+
final Class<?> beanClass = bean.getClass(); // Cannot throw Exception
182182
try {
183183
newBean = beanClass.newInstance();
184184
} catch (final Exception e) {
@@ -285,9 +285,9 @@ protected <R> Object convertType(final Class<R> newType, final Object value)
285285
protected Object[] createWriteMethodArguments(final Method method, Object value) throws IllegalAccessException, ClassCastException {
286286
try {
287287
if (value != null) {
288-
final Class<? extends Object>[] paramTypes = method.getParameterTypes();
288+
final Class<?>[] paramTypes = method.getParameterTypes();
289289
if (paramTypes != null && paramTypes.length > 0) {
290-
final Class<? extends Object> paramType = paramTypes[0];
290+
final Class<?> paramType = paramTypes[0];
291291
if (!paramType.isAssignableFrom(value.getClass())) {
292292
value = convertType(paramType, value);
293293
}
@@ -470,7 +470,7 @@ private void initialize() {
470470
return;
471471
}
472472

473-
final Class<? extends Object> beanClass = getBean().getClass();
473+
final Class<?> beanClass = getBean().getClass();
474474
try {
475475
// BeanInfo beanInfo = Introspector.getBeanInfo( bean, null );
476476
final BeanInfo beanInfo = Introspector.getBeanInfo(beanClass);
@@ -481,7 +481,7 @@ private void initialize() {
481481
final String name = propertyDescriptor.getName();
482482
final Method readMethod = propertyDescriptor.getReadMethod();
483483
final Method writeMethod = propertyDescriptor.getWriteMethod();
484-
final Class<? extends Object> aType = propertyDescriptor.getPropertyType();
484+
final Class<?> aType = propertyDescriptor.getPropertyType();
485485

486486
if (readMethod != null) {
487487
readMethods.put(name, readMethod);

0 commit comments

Comments
 (0)