commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1843016 - /commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java
Date Sat, 06 Oct 2018 14:40:07 GMT
Author: ggregory
Date: Sat Oct  6 14:40:07 2018
New Revision: 1843016

URL: http://svn.apache.org/viewvc?rev=1843016&view=rev
Log:
Format and remove unnecessary parens.

Modified:
    commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java

Modified: commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java?rev=1843016&r1=1843015&r2=1843016&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java
(original)
+++ commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/WrapDynaClass.java
Sat Oct  6 14:40:07 2018
@@ -129,9 +129,9 @@ public class WrapDynaClass implements Dy
     private static final ContextClassLoaderLocal<Map<CacheKey, WrapDynaClass>>
CLASSLOADER_CACHE =
         new ContextClassLoaderLocal<Map<CacheKey, WrapDynaClass>>() {
             @Override
-            protected Map<CacheKey, WrapDynaClass> initialValue() {
-                return new WeakHashMap<>();
-        }
+                protected Map<CacheKey, WrapDynaClass> initialValue() {
+                    return new WeakHashMap<>();
+                }
     };
 
     /**
@@ -141,8 +141,7 @@ public class WrapDynaClass implements Dy
     @SuppressWarnings("unchecked")
     private static Map<Object, Object> getDynaClassesMap() {
         @SuppressWarnings("rawtypes")
-        final
-        Map cache = CLASSLOADER_CACHE.get();
+        final Map cache = CLASSLOADER_CACHE.get();
         return cache;
     }
 
@@ -310,7 +309,7 @@ public class WrapDynaClass implements Dy
             throw new IllegalArgumentException
                     ("No property name specified");
         }
-        return (propertiesMap.get(name));
+        return propertiesMap.get(name);
 
     }
 
@@ -329,7 +328,7 @@ public class WrapDynaClass implements Dy
     @Override
     public DynaProperty[] getDynaProperties() {
 
-        return (properties);
+        return properties;
 
     }
 
@@ -380,7 +379,7 @@ public class WrapDynaClass implements Dy
      */
     public PropertyDescriptor getPropertyDescriptor(final String name) {
 
-        return (descriptorsMap.get(name));
+        return descriptorsMap.get(name);
 
     }
 
@@ -426,14 +425,14 @@ public class WrapDynaClass implements Dy
      */
     public static WrapDynaClass createDynaClass(final Class<?> beanClass, final PropertyUtilsBean
pu) {
 
-        final PropertyUtilsBean propUtils = (pu != null) ? pu : PropertyUtilsBean.getInstance();
+        final PropertyUtilsBean propUtils = pu != null ? pu : PropertyUtilsBean.getInstance();
         final CacheKey key = new CacheKey(beanClass, propUtils);
         WrapDynaClass dynaClass = getClassesCache().get(key);
         if (dynaClass == null) {
             dynaClass = new WrapDynaClass(beanClass, propUtils);
             getClassesCache().put(key, dynaClass);
         }
-        return (dynaClass);
+        return dynaClass;
 
     }
 



Mime
View raw message