This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch 1.X in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
commit 7afda8486dff341d35a0095c1f8409dd0ca792c4 Author: Gary Gregory <[email protected]> AuthorDate: Sun Aug 18 08:45:46 2024 -0400 Use diamonds --- .../commons/beanutils/MappedPropertyDescriptor.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java b/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java index b830bba3..75878a38 100644 --- a/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java +++ b/src/main/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java @@ -64,15 +64,15 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { className = m.getDeclaringClass().getName(); methodName = m.getName(); // Compiler needs generic. - methodRef = new SoftReference<Method>(m); + methodRef = new SoftReference<>(m); // Compiler needs generic. - classRef = new WeakReference<Class<?>>(m.getDeclaringClass()); + classRef = new WeakReference<>(m.getDeclaringClass()); final Class<?>[] types = m.getParameterTypes(); if (types.length == 2) { // Compiler needs generic. - writeParamTypeRef0 = new WeakReference<Class<?>>(types[0]); + writeParamTypeRef0 = new WeakReference<>(types[0]); // Compiler needs generic. - writeParamTypeRef1 = new WeakReference<Class<?>>(types[1]); + writeParamTypeRef1 = new WeakReference<>(types[1]); writeParamClassNames = new String[2]; writeParamClassNames[0] = types[0].getName(); writeParamClassNames[1] = types[1].getName(); @@ -90,7 +90,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { clazz = reLoadClass(); if (clazz != null) { // Compiler needs generic. - classRef = new WeakReference<Class<?>>(clazz); + classRef = new WeakReference<>(clazz); } } if (clazz == null) { @@ -105,7 +105,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { paramTypes[0] = reLoadClass(writeParamClassNames[0]); if (paramTypes[0] != null) { // Compiler needs generic. - writeParamTypeRef0 = new WeakReference<Class<?>>(paramTypes[0]); + writeParamTypeRef0 = new WeakReference<>(paramTypes[0]); } } paramTypes[1] = writeParamTypeRef1.get(); @@ -113,7 +113,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { paramTypes[1] = reLoadClass(writeParamClassNames[1]); if (paramTypes[1] != null) { // Compiler needs generic. - writeParamTypeRef1 = new WeakReference<Class<?>>(paramTypes[1]); + writeParamTypeRef1 = new WeakReference<>(paramTypes[1]); } } } else { @@ -464,7 +464,7 @@ public class MappedPropertyDescriptor extends PropertyDescriptor { mappedPropertyType = params[1]; } // Compiler needs generic. - mappedPropertyTypeRef = new SoftReference<Class<?>>(mappedPropertyType); + mappedPropertyTypeRef = new SoftReference<>(mappedPropertyType); } catch (final IntrospectionException ex) { throw ex; }
