commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1189322 - in /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl: ./ internal/ internal/entry/
Date Wed, 26 Oct 2011 17:12:09 GMT
Author: mcucchiara
Date: Wed Oct 26 17:12:08 2011
New Revision: 1189322

URL: http://svn.apache.org/viewvc?rev=1189322&view=rev
Log:
Removed spaces within empty method call parentheses

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultClassResolver.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumberElementsAccessor.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericExpression.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java Wed Oct 26 17:12:08 2011
@@ -35,7 +35,7 @@ class ASTMap
 {
     private String className;
 
-    private Map<OgnlContext, Class> defaultMapClassMap = new HashMap<OgnlContext, Class>( );
+    private Map<OgnlContext, Class> defaultMapClassMap = new HashMap<OgnlContext, Class>();
 
     public ASTMap( int id )
     {
@@ -58,7 +58,7 @@ class ASTMap
      * @return the class name.
      * @since 4.0
      */
-    String getClassName( )
+    String getClassName()
     {
         return className;
     }
@@ -73,12 +73,12 @@ class ASTMap
             Class defaultMapClass = getDefaultMapClass( context );
             try
             {
-                answer = (Map) defaultMapClass.newInstance( );
+                answer = (Map) defaultMapClass.newInstance();
             }
             catch ( Exception ex )
             {
                 /* This should never happen */
-                throw new OgnlException( "Default Map class '" + defaultMapClass.getName( ) + "' instantiation error",
+                throw new OgnlException( "Default Map class '" + defaultMapClass.getName() + "' instantiation error",
                                          ex );
             }
         }
@@ -86,7 +86,7 @@ class ASTMap
         {
             try
             {
-                answer = (Map) OgnlRuntime.classForName( context, className ).newInstance( );
+                answer = (Map) OgnlRuntime.classForName( context, className ).newInstance();
             }
             catch ( Exception ex )
             {
@@ -94,10 +94,10 @@ class ASTMap
             }
         }
 
-        for ( int i = 0; i < jjtGetNumChildren( ); ++i )
+        for ( int i = 0; i < jjtGetNumChildren(); ++i )
         {
             ASTKeyValue kv = (ASTKeyValue) _children[i];
-            Node k = kv.getKey( ), v = kv.getValue( );
+            Node k = kv.getKey(), v = kv.getValue();
 
             answer.put( k.getValue( context, source ), ( v == null ) ? null : v.getValue( context, source ) );
         }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultClassResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultClassResolver.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultClassResolver.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DefaultClassResolver.java Wed Oct 26 17:12:08 2011
@@ -57,7 +57,7 @@ public class DefaultClassResolver
 
         if ( result == null )
         {
-            ClassLoader classLoader = ClassLoader.getSystemClassLoader( );
+            ClassLoader classLoader = ClassLoader.getSystemClassLoader();
             try
             {
                 result = classLoader.loadClass( className );

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EvaluationPool.java Wed Oct 26 17:12:08 2011
@@ -26,14 +26,14 @@ import java.util.List;
  */
 public final class EvaluationPool
 {
-    public EvaluationPool( )
+    public EvaluationPool()
     {
         this( 0 );
     }
 
     public EvaluationPool( int initialSize )
     {
-        super( );
+        super();
         // do not init object pooling
     }
 
@@ -92,7 +92,7 @@ public final class EvaluationPool
      *
      * @deprecated object-pooling now relies on the jvm garbage collection
      */
-    public int getSize( )
+    public int getSize()
     {
         return 0;
     }
@@ -103,7 +103,7 @@ public final class EvaluationPool
      *
      * @deprecated object-pooling now relies on the jvm garbage collection
      */
-    public int getCreatedCount( )
+    public int getCreatedCount()
     {
         return 0;
     }
@@ -114,7 +114,7 @@ public final class EvaluationPool
      *
      * @deprecated object-pooling now relies on the jvm garbage collection
      */
-    public int getRecoveredCount( )
+    public int getRecoveredCount()
     {
         return 0;
     }
@@ -125,7 +125,7 @@ public final class EvaluationPool
      *
      * @deprecated object-pooling now relies on the jvm garbage collection
      */
-    public int getRecycledCount( )
+    public int getRecycledCount()
     {
         return 0;
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java Wed Oct 26 17:12:08 2011
@@ -49,19 +49,19 @@ public class ListPropertyAccessor
 
             if ( name.equals( "size" ) )
             {
-                result = list.size( );
+                result = list.size();
             }
             else
             {
                 if ( name.equals( "iterator" ) )
                 {
-                    result = list.iterator( );
+                    result = list.iterator();
                 }
                 else
                 {
                     if ( name.equals( "isEmpty" ) || name.equals( "empty" ) )
                     {
-                        result = list.isEmpty( ) ? Boolean.TRUE : Boolean.FALSE;
+                        result = list.isEmpty() ? Boolean.TRUE : Boolean.FALSE;
                     }
                     else
                     {
@@ -75,13 +75,13 @@ public class ListPropertyAccessor
 
         if ( name instanceof Number )
         {
-            return list.get( ( (Number) name ).intValue( ) );
+            return list.get( ( (Number) name ).intValue() );
         }
 
         if ( name instanceof DynamicSubscript )
         {
-            int len = list.size( );
-            switch ( ( (DynamicSubscript) name ).getFlag( ) )
+            int len = list.size();
+            switch ( ( (DynamicSubscript) name ).getFlag() )
             {
                 case DynamicSubscript.FIRST:
                     return len > 0 ? list.get( 0 ) : null;
@@ -114,14 +114,14 @@ public class ListPropertyAccessor
 
         if ( name instanceof Number )
         {
-            list.set( ( (Number) name ).intValue( ), value );
+            list.set( ( (Number) name ).intValue(), value );
             return;
         }
 
         if ( name instanceof DynamicSubscript )
         {
-            int len = list.size( );
-            switch ( ( (DynamicSubscript) name ).getFlag( ) )
+            int len = list.size();
+            switch ( ( (DynamicSubscript) name ).getFlag() )
             {
                 case DynamicSubscript.FIRST:
                     if ( len > 0 )
@@ -147,7 +147,7 @@ public class ListPropertyAccessor
                     {
                         throw new OgnlException( "Value must be a collection" );
                     }
-                    list.clear( );
+                    list.clear();
                     list.addAll( (Collection<?>) value );
                     return;
                 }
@@ -189,7 +189,7 @@ public class ListPropertyAccessor
     @Override
     public String getSourceAccessor( OgnlContext context, Object target, Object index )
     {
-        String indexStr = index.toString( ).replaceAll( "\"", "" );
+        String indexStr = index.toString().replaceAll( "\"", "" );
 
         if ( String.class.isInstance( index ) )
         {
@@ -216,11 +216,11 @@ public class ListPropertyAccessor
         // TODO: This feels really inefficient, must be some better way
         // check if the index string represents a method on a custom class implementing java.util.List instead..
 
-        if ( context.getCurrentObject( ) != null && !Number.class.isInstance( context.getCurrentObject( ) ) )
+        if ( context.getCurrentObject() != null && !Number.class.isInstance( context.getCurrentObject() ) )
         {
             try
             {
-                Method m = OgnlRuntime.getReadMethod( target.getClass( ), indexStr );
+                Method m = OgnlRuntime.getReadMethod( target.getClass(), indexStr );
 
                 if ( m != null )
                 {
@@ -240,17 +240,17 @@ public class ListPropertyAccessor
         // System.out.println("Curent type: " + context.getCurrentType() + " current object type " +
         // context.getCurrentObject().getClass());
 
-        if ( !context.getCurrentType( ).isPrimitive( ) && Number.class.isAssignableFrom( context.getCurrentType( ) ) )
+        if ( !context.getCurrentType().isPrimitive() && Number.class.isAssignableFrom( context.getCurrentType() ) )
         {
-            indexStr += "." + OgnlRuntime.getNumericValueGetter( context.getCurrentType( ) );
+            indexStr += "." + OgnlRuntime.getNumericValueGetter( context.getCurrentType() );
         }
-        else if ( context.getCurrentObject( ) != null && Number.class.isAssignableFrom(
-            context.getCurrentObject( ).getClass( ) ) && !context.getCurrentType( ).isPrimitive( ) )
+        else if ( context.getCurrentObject() != null && Number.class.isAssignableFrom(
+            context.getCurrentObject().getClass() ) && !context.getCurrentType().isPrimitive() )
         {
             // means it needs to be cast first as well
 
             String toString =
-                String.class.isInstance( index ) && context.getCurrentType( ) != Object.class ? "" : ".toString()";
+                String.class.isInstance( index ) && context.getCurrentType() != Object.class ? "" : ".toString()";
 
             indexStr = "org.apache.commons.ognl.OgnlOps#getIntValue(" + indexStr + toString + ")";
         }
@@ -263,7 +263,7 @@ public class ListPropertyAccessor
     @Override
     public String getSourceSetter( OgnlContext context, Object target, Object index )
     {
-        String indexStr = index.toString( ).replaceAll( "\"", "" );
+        String indexStr = index.toString().replaceAll( "\"", "" );
 
         // TODO: This feels really inefficient, must be some better way
         // check if the index string represents a method on a custom class implementing java.util.List instead..
@@ -273,13 +273,13 @@ public class ListPropertyAccessor
          * Number.class.isInstance(context.getCurrentObject()));
          */
 
-        if ( context.getCurrentObject( ) != null && !Number.class.isInstance( context.getCurrentObject( ) ) )
+        if ( context.getCurrentObject() != null && !Number.class.isInstance( context.getCurrentObject() ) )
         {
             try
             {
-                Method m = OgnlRuntime.getWriteMethod( target.getClass( ), indexStr );
+                Method m = OgnlRuntime.getWriteMethod( target.getClass(), indexStr );
 
-                if ( m != null || !context.getCurrentType( ).isPrimitive( ) )
+                if ( m != null || !context.getCurrentType().isPrimitive() )
                 {
                     System.out.println(
                         "super source setter returned: " + super.getSourceSetter( context, target, index ) );
@@ -301,17 +301,17 @@ public class ListPropertyAccessor
 
         // need to convert to primitive for list index access
 
-        if ( !context.getCurrentType( ).isPrimitive( ) && Number.class.isAssignableFrom( context.getCurrentType( ) ) )
+        if ( !context.getCurrentType().isPrimitive() && Number.class.isAssignableFrom( context.getCurrentType() ) )
         {
-            indexStr += "." + OgnlRuntime.getNumericValueGetter( context.getCurrentType( ) );
+            indexStr += "." + OgnlRuntime.getNumericValueGetter( context.getCurrentType() );
         }
-        else if ( context.getCurrentObject( ) != null && Number.class.isAssignableFrom(
-            context.getCurrentObject( ).getClass( ) ) && !context.getCurrentType( ).isPrimitive( ) )
+        else if ( context.getCurrentObject() != null && Number.class.isAssignableFrom(
+            context.getCurrentObject().getClass() ) && !context.getCurrentType().isPrimitive() )
         {
             // means it needs to be cast first as well
 
             String toString =
-                String.class.isInstance( index ) && context.getCurrentType( ) != Object.class ? "" : ".toString()";
+                String.class.isInstance( index ) && context.getCurrentType() != Object.class ? "" : ".toString()";
 
             indexStr = "org.apache.commons.ognl.OgnlOps#getIntValue(" + indexStr + toString + ")";
         }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java Wed Oct 26 17:12:08 2011
@@ -158,5 +158,6 @@ public interface NodeVisitor<R, P>
     R visit( ASTSelectFirst node, P data )
         throws OgnlException;
 
-    R visit(ASTSelectLast node, P data)  throws OgnlException;
+    R visit( ASTSelectLast node, P data )
+        throws OgnlException;
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumberElementsAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumberElementsAccessor.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumberElementsAccessor.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumberElementsAccessor.java Wed Oct 26 17:12:08 2011
@@ -36,7 +36,7 @@ public class NumberElementsAccessor
      */
     public Enumeration<?> getElements( final Object target )
     {
-        return new Enumeration<Object>( )
+        return new Enumeration<Object>()
         {
             private int type = OgnlOps.getNumericType( target );
 
@@ -44,16 +44,16 @@ public class NumberElementsAccessor
 
             private long finish = OgnlOps.longValue( target );
 
-            public boolean hasMoreElements( )
+            public boolean hasMoreElements()
             {
                 return next < finish;
             }
 
-            public Object nextElement( )
+            public Object nextElement()
             {
                 if ( next >= finish )
                 {
-                    throw new NoSuchElementException( );
+                    throw new NoSuchElementException();
                 }
                 return OgnlOps.newInteger( type, next++ );
             }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericExpression.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericExpression.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericExpression.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NumericExpression.java Wed Oct 26 17:12:08 2011
@@ -80,7 +80,7 @@ public abstract class NumericExpression
 
             if ( value != null )
             {
-                _getterClass = value.getClass( );
+                _getterClass = value.getClass();
             }
 
             for ( int i = 0; i < _children.length; i++ )

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ObjectArrayPool.java Wed Oct 26 17:12:08 2011
@@ -28,9 +28,9 @@ package org.apache.commons.ognl;
  */
 public final class ObjectArrayPool
 {
-    public ObjectArrayPool( )
+    public ObjectArrayPool()
     {
-        super( );
+        super();
     }
 
     public Object[] create( int arraySize )

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/Cache.java Wed Oct 26 17:12:08 2011
@@ -23,9 +23,9 @@ package org.apache.commons.ognl.internal
 
 public interface Cache<K, V>
 {
-    void clear( );
+    void clear();
 
-    int getSize( );
+    int getSize();
 
     V get( K key )
         throws CacheException;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java Wed Oct 26 17:12:08 2011
@@ -28,6 +28,6 @@ public class CacheException
 {
     public CacheException( Throwable e )
     {
-       super(e.getMessage(),e);
+        super( e.getMessage(), e );
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheFactory.java Wed Oct 26 17:12:08 2011
@@ -10,9 +10,9 @@ import org.apache.commons.ognl.internal.
  */
 public interface CacheFactory
 {
-    <K,V> Cache<K,V> createCache( CacheEntryFactory<K, V> entryFactory );
+    <K, V> Cache<K, V> createCache( CacheEntryFactory<K, V> entryFactory );
 
-    <V> ClassCache<V> createClassCache( );
+    <V> ClassCache<V> createClassCache();
 
     <V> ClassCache<V> createClassCache( ClassCacheEntryFactory<V> entryFactory );
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheHandler.java Wed Oct 26 17:12:08 2011
@@ -24,7 +24,7 @@ package org.apache.commons.ognl.internal
 public class ClassCacheHandler
 {
 
-    private ClassCacheHandler( )
+    private ClassCacheHandler()
     {
     }
 
@@ -39,7 +39,7 @@ public class ClassCacheHandler
             {
                 Class<?> keyFound;
 
-                if ( forClass.isArray( ) )
+                if ( forClass.isArray() )
                 {
                     answer = handlers.get( Object[].class );
                     keyFound = null;
@@ -48,19 +48,19 @@ public class ClassCacheHandler
                 {
                     keyFound = forClass;
                     outer:
-                    for ( Class<?> c = forClass; c != null; c = c.getSuperclass( ) )
+                    for ( Class<?> c = forClass; c != null; c = c.getSuperclass() )
                     {
                         answer = handlers.get( c );
                         if ( answer == null )
                         {
-                            Class<?>[] interfaces = c.getInterfaces( );
+                            Class<?>[] interfaces = c.getInterfaces();
                             for ( Class<?> iface : interfaces )
                             {
                                 answer = handlers.get( iface );
                                 if ( answer == null )
                                 {
                                     /* Try super-interfaces */
-                                    answer = getHandler( iface ,handlers);
+                                    answer = getHandler( iface, handlers );
                                 }
                                 if ( answer != null )
                                 {

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java Wed Oct 26 17:12:08 2011
@@ -38,7 +38,7 @@ public class ClassCacheImpl<V>
     /* ...and now you see why. The table size is used as a mask for generating hashes */
     private static final int TABLE_SIZE_MASK = TABLE_SIZE - 1;
 
-    private Entry<Class<?>,V>[] _table = new Entry[TABLE_SIZE];
+    private Entry<Class<?>, V>[] _table = new Entry[TABLE_SIZE];
 
     private ClassCacheInspector _classInspector;
 
@@ -81,7 +81,7 @@ public class ClassCacheImpl<V>
     {
         int i = key.hashCode() & TABLE_SIZE_MASK;
 
-        Entry<Class<?>,V> entry = _table[i];
+        Entry<Class<?>, V> entry = _table[i];
 
         while ( entry != null )
         {
@@ -108,18 +108,18 @@ public class ClassCacheImpl<V>
         V result = null;
         int i = key.hashCode() & TABLE_SIZE_MASK;
 
-        Entry<Class<?>,V> entry = _table[i];
+        Entry<Class<?>, V> entry = _table[i];
 
         if ( entry == null )
         {
-            _table[i] = new Entry<Class<?>,V>( key, value );
+            _table[i] = new Entry<Class<?>, V>( key, value );
             _size++;
         }
         else
         {
             if ( key == entry.getKey() )
             {
-                result = entry.getValue( );
+                result = entry.getValue();
                 entry.setValue( value );
             }
             else
@@ -129,7 +129,7 @@ public class ClassCacheImpl<V>
                     if ( key == entry.getKey() )
                     {
                         /* replace value */
-                        result = entry.getValue( );
+                        result = entry.getValue();
                         entry.setValue( value );
                         break;
                     }
@@ -137,7 +137,7 @@ public class ClassCacheImpl<V>
                     if ( entry.getNext() == null )
                     {
                         /* add value */
-                        entry.setNext( new Entry<Class<?>,V>( key, value ) );
+                        entry.setNext( new Entry<Class<?>, V>( key, value ) );
                         break;
                     }
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCache.java Wed Oct 26 17:12:08 2011
@@ -28,11 +28,11 @@ import java.util.concurrent.ConcurrentHa
 public class ConcurrentHashMapCache<K, V>
     implements Cache<K, V>
 {
-    private ConcurrentHashMap<K, V> cache = new ConcurrentHashMap<K, V>( );
+    private ConcurrentHashMap<K, V> cache = new ConcurrentHashMap<K, V>();
 
     private CacheEntryFactory<K, V> cacheEntryFactory;
 
-    public ConcurrentHashMapCache( )
+    public ConcurrentHashMapCache()
     {
     }
 
@@ -41,17 +41,17 @@ public class ConcurrentHashMapCache<K, V
         this.cacheEntryFactory = cacheEntryFactory;
     }
 
-    public void clear( )
+    public void clear()
     {
-        cache.clear( );
+        cache.clear();
     }
 
-    public int getSize( )
+    public int getSize()
     {
-        return cache.size( );
+        return cache.size();
     }
 
-    public V get( K key)
+    public V get( K key )
         throws CacheException
     {
         V v = cache.get( key );
@@ -85,7 +85,7 @@ public class ConcurrentHashMapCache<K, V
         return value;
     }
 
-    public boolean contains( K key)
+    public boolean contains( K key )
     {
         return this.cache.contains( key );
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ConcurrentHashMapCacheFactory.java Wed Oct 26 17:12:08 2011
@@ -28,18 +28,18 @@ public class ConcurrentHashMapCacheFacto
     implements CacheFactory
 {
 
-    public <K,V> Cache<K,V> createCache(CacheEntryFactory<K,V> entryFactory )
+    public <K, V> Cache<K, V> createCache( CacheEntryFactory<K, V> entryFactory )
     {
-        return new ConcurrentHashMapCache<K, V>(entryFactory );
+        return new ConcurrentHashMapCache<K, V>( entryFactory );
     }
 
-    public <V> ClassCache<V> createClassCache( )
+    public <V> ClassCache<V> createClassCache()
     {
         return createClassCache( null );
     }
 
     public <V> ClassCache<V> createClassCache( ClassCacheEntryFactory<V> entryFactory )
     {
-        return new ConcurrentHashMapClassCache<V>(entryFactory );
+        return new ConcurrentHashMapClassCache<V>( entryFactory );
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCache.java Wed Oct 26 17:12:08 2011
@@ -38,19 +38,19 @@ public class HashMapCache<K, V>
         this.cacheEntryFactory = cacheEntryFactory;
     }
 
-    public void clear( )
+    public void clear()
     {
         synchronized ( cache )
         {
-            cache.clear( );
+            cache.clear();
         }
     }
 
-    public int getSize( )
+    public int getSize()
     {
         synchronized ( cache )
         {
-            return cache.size( );
+            return cache.size();
         }
     }
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/HashMapCacheFactory.java Wed Oct 26 17:12:08 2011
@@ -32,7 +32,7 @@ public class HashMapCacheFactory
         return new HashMapCache<K, V>( entryFactory );
     }
 
-    public <V> ClassCache<V> createClassCache( )
+    public <V> ClassCache<V> createClassCache()
     {
         return createClassCache( null );
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCache.java Wed Oct 26 17:12:08 2011
@@ -33,17 +33,17 @@ import java.util.concurrent.locks.Reentr
 public class ReentrantReadWriteLockCache<K, V>
     implements Cache<K, V>
 {
-    private final ReadWriteLock lock = new ReentrantReadWriteLock( );
+    private final ReadWriteLock lock = new ReentrantReadWriteLock();
 
-    private final Lock readLock = lock.readLock( );
+    private final Lock readLock = lock.readLock();
 
-    private final Lock writeLock = lock.writeLock( );
+    private final Lock writeLock = lock.writeLock();
 
-    final Map<K, V> cache = new HashMap<K, V>( );
+    final Map<K, V> cache = new HashMap<K, V>();
 
     private CacheEntryFactory<K, V> cacheEntryFactory;
 
-    public ReentrantReadWriteLockCache( )
+    public ReentrantReadWriteLockCache()
     {
     }
 
@@ -52,19 +52,19 @@ public class ReentrantReadWriteLockCache
         this.cacheEntryFactory = cacheEntryFactory;
     }
 
-    public void clear( )
+    public void clear()
     {
         synchronized ( cache )
         {
-            cache.clear( );
+            cache.clear();
         }
     }
 
-    public int getSize( )
+    public int getSize()
     {
         synchronized ( cache )
         {
-            return cache.size( );
+            return cache.size();
         }
     }
 
@@ -74,7 +74,7 @@ public class ReentrantReadWriteLockCache
     {
         V v;
         boolean shouldCreate;
-        readLock.lock( );
+        readLock.lock();
         try
         {
             v = cache.get( key );
@@ -82,15 +82,15 @@ public class ReentrantReadWriteLockCache
         }
         finally
         {
-            readLock.unlock( );
+            readLock.unlock();
         }
         if ( shouldCreate )
         {
             try
             {
-                writeLock.lock( );
+                writeLock.lock();
                 v = cache.get( key );
-                if(!shouldCreate( cacheEntryFactory, v ) )
+                if ( !shouldCreate( cacheEntryFactory, v ) )
                 {
                     return v;
                 }
@@ -100,7 +100,7 @@ public class ReentrantReadWriteLockCache
             }
             finally
             {
-                writeLock.unlock( );
+                writeLock.unlock();
             }
 
         }
@@ -123,7 +123,7 @@ public class ReentrantReadWriteLockCache
 
     public V put( K key, V value )
     {
-        writeLock.lock( );
+        writeLock.lock();
         try
         {
             cache.put( key, value );
@@ -131,7 +131,7 @@ public class ReentrantReadWriteLockCache
         }
         finally
         {
-            writeLock.unlock( );
+            writeLock.unlock();
         }
     }
 }
\ No newline at end of file

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockCacheFactory.java Wed Oct 26 17:12:08 2011
@@ -32,13 +32,13 @@ public class ReentrantReadWriteLockCache
         return new ReentrantReadWriteLockCache<K, V>( entryFactory );
     }
 
-    public <V> ClassCache<V> createClassCache( )
+    public <V> ClassCache<V> createClassCache()
     {
-        return  createClassCache( null );
+        return createClassCache( null );
     }
 
     public <V> ClassCache<V> createClassCache( ClassCacheEntryFactory<V> entryFactory )
     {
-       return new ReentrantReadWriteLockClassCache<V>( entryFactory );
+        return new ReentrantReadWriteLockClassCache<V>( entryFactory );
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ReentrantReadWriteLockClassCache.java Wed Oct 26 17:12:08 2011
@@ -26,7 +26,7 @@ import org.apache.commons.ognl.internal.
 
 
 public class ReentrantReadWriteLockClassCache<T>
-    extends HashMapCache<Class<?>,T>
+    extends HashMapCache<Class<?>, T>
     implements ClassCache<T>
 {
     private ClassCacheInspector inspector;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntry.java Wed Oct 26 17:12:08 2011
@@ -37,7 +37,7 @@ public class DeclaredMethodCacheEntry
         super( targetClass );
     }
 
-    public DeclaredMethodCacheEntry( Class<?> targetClass, MethodType type)
+    public DeclaredMethodCacheEntry( Class<?> targetClass, MethodType type )
     {
         super( targetClass );
         this.type = type;
@@ -61,10 +61,10 @@ public class DeclaredMethodCacheEntry
     }
 
     @Override
-    public int hashCode( )
+    public int hashCode()
     {
-        int result = super.hashCode( );
-        result = 31 * result + ( type != null ? type.hashCode( ) : 0 );
+        int result = super.hashCode();
+        result = 31 * result + ( type != null ? type.hashCode() : 0 );
         return result;
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/DeclaredMethodCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -41,7 +41,7 @@ public class DeclaredMethodCacheEntryFac
         }
         else
         {
-            boolean isStatic = Modifier.isStatic( method.getModifiers( ) );
+            boolean isStatic = Modifier.isStatic( method.getModifiers() );
             if ( key.type == DeclaredMethodCacheEntry.MethodType.STATIC )
             {
                 return isStatic;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/FiedlCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -33,11 +33,11 @@ public class FiedlCacheEntryFactory
     public Map<String, Field> create( Class<?> key )
         throws CacheException
     {
-        Field[] declaredFields = key.getDeclaredFields( );
+        Field[] declaredFields = key.getDeclaredFields();
         HashMap<String, Field> result = new HashMap<String, Field>( declaredFields.length );
         for ( Field field : declaredFields )
         {
-            result.put( field.getName( ), field );
+            result.put( field.getName(), field );
         }
         return result;
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeCacheEntry.java Wed Oct 26 17:12:08 2011
@@ -55,10 +55,10 @@ public class GenericMethodParameterTypeC
     }
 
     @Override
-    public int hashCode( )
+    public int hashCode()
     {
-        int result = method.hashCode( );
-        result = 31 * result + type.hashCode( );
+        int result = method.hashCode();
+        result = 31 * result + type.hashCode();
         return result;
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/GenericMethodParameterTypeFactory.java Wed Oct 26 17:12:08 2011
@@ -37,9 +37,9 @@ public class GenericMethodParameterTypeF
     {
         Class<?>[] types;
 
-        ParameterizedType param = (ParameterizedType) entry.type.getGenericSuperclass( );
-        Type[] genTypes = entry.method.getGenericParameterTypes( );
-        TypeVariable<?>[] declaredTypes = entry.method.getDeclaringClass( ).getTypeParameters( );
+        ParameterizedType param = (ParameterizedType) entry.type.getGenericSuperclass();
+        Type[] genTypes = entry.method.getGenericParameterTypes();
+        TypeVariable<?>[] declaredTypes = entry.method.getDeclaringClass().getTypeParameters();
 
         types = new Class[genTypes.length];
 
@@ -53,11 +53,11 @@ public class GenericMethodParameterTypeF
             }
             else if ( GenericArrayType.class.isInstance( genTypes[i] ) )
             {
-                paramType = (TypeVariable<?>) ( (GenericArrayType) genTypes[i] ).getGenericComponentType( );
+                paramType = (TypeVariable<?>) ( (GenericArrayType) genTypes[i] ).getGenericComponentType();
             }
             else if ( ParameterizedType.class.isInstance( genTypes[i] ) )
             {
-                types[i] = (Class<?>) ( (ParameterizedType) genTypes[i] ).getRawType( );
+                types[i] = (Class<?>) ( (ParameterizedType) genTypes[i] ).getRawType();
                 continue;
             }
             else if ( Class.class.isInstance( genTypes[i] ) )
@@ -72,13 +72,13 @@ public class GenericMethodParameterTypeF
             {
                 if ( GenericArrayType.class.isInstance( genTypes[i] ) )
                 {
-                    resolved = Array.newInstance( resolved, 0 ).getClass( );
+                    resolved = Array.newInstance( resolved, 0 ).getClass();
                 }
 
                 types[i] = resolved;
                 continue;
             }
-            types[i] = entry.method.getParameterTypes( )[i];
+            types[i] = entry.method.getParameterTypes()[i];
         }
 
         return types;
@@ -86,17 +86,17 @@ public class GenericMethodParameterTypeF
 
     private Class<?> resolveType( ParameterizedType param, TypeVariable<?> var, TypeVariable<?>[] declaredTypes )
     {
-        if ( param.getActualTypeArguments( ).length < 1 )
+        if ( param.getActualTypeArguments().length < 1 )
         {
             return null;
         }
 
         for ( int i = 0; i < declaredTypes.length; i++ )
         {
-            if ( !TypeVariable.class.isInstance( param.getActualTypeArguments( )[i] )
-                && declaredTypes[i].getName( ).equals( var.getName( ) ) )
+            if ( !TypeVariable.class.isInstance( param.getActualTypeArguments()[i] )
+                && declaredTypes[i].getName().equals( var.getName() ) )
             {
-                return (Class<?>) param.getActualTypeArguments( )[i];
+                return (Class<?>) param.getActualTypeArguments()[i];
             }
         }
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -33,19 +33,18 @@ public class MethodAccessCacheEntryFacto
     public static final MethodAccessEntryValue INACCESSIBLE_NON_PUBLIC_METHOD =
         new MethodAccessEntryValue( false, true );
 
-    public static final MethodAccessEntryValue ACCESSIBLE_NON_PUBLIC_METHOD =
-        new MethodAccessEntryValue( true, true );
+    public static final MethodAccessEntryValue ACCESSIBLE_NON_PUBLIC_METHOD = new MethodAccessEntryValue( true, true );
 
     public static final MethodAccessEntryValue PUBLIC_METHOD = new MethodAccessEntryValue( true );
 
     public MethodAccessEntryValue create( Method method )
         throws CacheException
     {
-        final boolean notPublic = !Modifier.isPublic( method.getModifiers( ) ) || !Modifier.isPublic(
-            method.getDeclaringClass( ).getModifiers( ) );
+        final boolean notPublic = !Modifier.isPublic( method.getModifiers() ) || !Modifier.isPublic(
+            method.getDeclaringClass().getModifiers() );
         if ( notPublic )
         {
-            if ( !method.isAccessible( ) )
+            if ( !method.isAccessible() )
             {
                 return INACCESSIBLE_NON_PUBLIC_METHOD;
             }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodAccessEntryValue.java Wed Oct 26 17:12:08 2011
@@ -38,12 +38,12 @@ public class MethodAccessEntryValue
         this.notPublic = notPublic;
     }
 
-    public boolean isAccessible( )
+    public boolean isAccessible()
     {
         return isAccessible;
     }
 
-    public boolean isNotPublic( )
+    public boolean isNotPublic()
     {
         return notPublic;
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntry.java Wed Oct 26 17:12:08 2011
@@ -21,7 +21,8 @@
 
 package org.apache.commons.ognl.internal.entry;
 
-public class MethodCacheEntry implements CacheEntry
+public class MethodCacheEntry
+    implements CacheEntry
 {
     public Class<?> targetClass;
 
@@ -49,8 +50,8 @@ public class MethodCacheEntry implements
     }
 
     @Override
-    public int hashCode( )
+    public int hashCode()
     {
-        return targetClass.hashCode( );
+        return targetClass.hashCode();
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/MethodCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -31,7 +31,7 @@ import java.util.List;
 import java.util.Map;
 
 public abstract class MethodCacheEntryFactory<T extends MethodCacheEntry>
-    implements CacheEntryFactory<T,Map<String, List<Method>>>
+    implements CacheEntryFactory<T, Map<String, List<Method>>>
 {
     public Map<String, List<Method>> create( T key )
         throws CacheException
@@ -41,7 +41,7 @@ public abstract class MethodCacheEntryFa
         Class<?> c = key.targetClass;
         while ( c != null )
         {
-            for ( Method method : c.getDeclaredMethods( ) )
+            for ( Method method : c.getDeclaredMethods() )
             {
                 // skip over synthetic methods
 
@@ -52,18 +52,18 @@ public abstract class MethodCacheEntryFa
 
                 if ( shouldCache( key, method ) )
                 {
-                    List<Method> ml = result.get( method.getName( ) );
+                    List<Method> ml = result.get( method.getName() );
 
                     if ( ml == null )
                     {
-                        ml = new ArrayList<Method>( );
-                        result.put( method.getName( ), ml );
+                        ml = new ArrayList<Method>();
+                        result.put( method.getName(), ml );
                     }
 
                     ml.add( method );
                 }
             }
-            c = c.getSuperclass( );
+            c = c.getSuperclass();
         }
         return result;
     }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntry.java Wed Oct 26 17:12:08 2011
@@ -23,7 +23,8 @@ package org.apache.commons.ognl.internal
 
 import java.lang.reflect.Method;
 
-public class PermissionCacheEntry implements CacheEntry
+public class PermissionCacheEntry
+    implements CacheEntry
 {
     public Method method;
 
@@ -51,8 +52,8 @@ public class PermissionCacheEntry implem
     }
 
     @Override
-    public int hashCode( )
+    public int hashCode()
     {
-        return method != null ? method.hashCode( ) : 0;
+        return method != null ? method.hashCode() : 0;
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PermissionCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -27,13 +27,13 @@ import org.apache.commons.ognl.internal.
 import java.security.Permission;
 
 public class PermissionCacheEntryFactory
-    implements CacheEntryFactory<PermissionCacheEntry,Permission>
+    implements CacheEntryFactory<PermissionCacheEntry, Permission>
 {
 
     public Permission create( PermissionCacheEntry key )
         throws CacheException
     {
-        return new OgnlInvokePermission( "invoke." + key.method.getDeclaringClass( ).getName() + "." + key.method.getName( ) );
+        return new OgnlInvokePermission( "invoke." + key.method.getDeclaringClass().getName() + "." + key.method.getName() );
     }
 }
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java?rev=1189322&r1=1189321&r2=1189322&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java Wed Oct 26 17:12:08 2011
@@ -34,34 +34,34 @@ import java.util.List;
 import java.util.Map;
 
 public class PropertyDescriptorCacheEntryFactory
-    implements ClassCacheEntryFactory<Map<String,PropertyDescriptor>>
+    implements ClassCacheEntryFactory<Map<String, PropertyDescriptor>>
 {
-    public Map<String,PropertyDescriptor> create( Class<?> targetClass)
+    public Map<String, PropertyDescriptor> create( Class<?> targetClass )
         throws CacheException
     {
         Map<String, PropertyDescriptor> result = new HashMap<String, PropertyDescriptor>( 101 );
         PropertyDescriptor[] pda;
         try
         {
-            pda = Introspector.getBeanInfo( targetClass ).getPropertyDescriptors( );
+            pda = Introspector.getBeanInfo( targetClass ).getPropertyDescriptors();
 
             for ( int i = 0, icount = pda.length; i < icount; i++ )
             {
                 // workaround for Introspector bug 6528714 (bugs.sun.com)
-                if ( pda[i].getReadMethod( ) != null && !OgnlRuntime.isMethodCallable( pda[i].getReadMethod( ) ) )
+                if ( pda[i].getReadMethod() != null && !OgnlRuntime.isMethodCallable( pda[i].getReadMethod() ) )
                 {
                     pda[i].setReadMethod(
-                        findClosestMatchingMethod( targetClass, pda[i].getReadMethod( ), pda[i].getName( ),
-                                                   pda[i].getPropertyType( ), true ) );
+                        findClosestMatchingMethod( targetClass, pda[i].getReadMethod(), pda[i].getName(),
+                                                   pda[i].getPropertyType(), true ) );
                 }
-                if ( pda[i].getWriteMethod( ) != null && !OgnlRuntime.isMethodCallable( pda[i].getWriteMethod( ) ) )
+                if ( pda[i].getWriteMethod() != null && !OgnlRuntime.isMethodCallable( pda[i].getWriteMethod() ) )
                 {
                     pda[i].setWriteMethod(
-                        findClosestMatchingMethod( targetClass, pda[i].getWriteMethod( ), pda[i].getName( ),
-                                                   pda[i].getPropertyType( ), false ) );
+                        findClosestMatchingMethod( targetClass, pda[i].getWriteMethod(), pda[i].getName(),
+                                                   pda[i].getPropertyType(), false ) );
                 }
 
-                result.put( pda[i].getName( ), pda[i] );
+                result.put( pda[i].getName(), pda[i] );
             }
 
             OgnlRuntime.findObjectIndexedPropertyDescriptors( targetClass, result );
@@ -85,9 +85,9 @@ public class PropertyDescriptorCacheEntr
 
         for ( Method method : methods )
         {
-            if ( method.getName( ).equals( m.getName( ) ) && m.getReturnType( ).isAssignableFrom( m.getReturnType( ) )
-                && method.getReturnType( ) == propertyType
-                && method.getParameterTypes( ).length == m.getParameterTypes( ).length )
+            if ( method.getName().equals( m.getName() ) && m.getReturnType().isAssignableFrom( m.getReturnType() )
+                && method.getReturnType() == propertyType
+                && method.getParameterTypes().length == m.getParameterTypes().length )
             {
                 return method;
             }



Mime
View raw message