commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1188675 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java
Date Tue, 25 Oct 2011 14:37:46 GMT
Author: mcucchiara
Date: Tue Oct 25 14:37:46 2011
New Revision: 1188675

URL: http://svn.apache.org/viewvc?rev=1188675&view=rev
Log:
Fixed checkstyle warning

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.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=1188675&r1=1188674&r2=1188675&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 Tue Oct 25
14:37:46 2011
@@ -26,6 +26,7 @@ import java.util.Map;
 
 /**
  * $Id$
+ *
  * @author Luke Blanshard (blanshlu@netscape.net)
  * @author Drew Davidson (drew@ognl.org)
  */
@@ -34,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 )
     {
@@ -57,7 +58,7 @@ class ASTMap
      * @return the class name.
      * @since 4.0
      */
-    String getClassName()
+    String getClassName( )
     {
         return className;
     }
@@ -72,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 );
             }
         }
@@ -85,7 +86,7 @@ class ASTMap
         {
             try
             {
-                answer = (Map) OgnlRuntime.classForName( context, className ).newInstance();
+                answer = (Map) OgnlRuntime.classForName( context, className ).newInstance(
);
             }
             catch ( Exception ex )
             {
@@ -93,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 ) );
         }
@@ -113,16 +114,18 @@ class ASTMap
     {
         throw new UnsupportedCompilationException( "Map expressions not supported as native
java yet." );
     }
-    
+
     public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data
)
         throws OgnlException
     {
         return visitor.visit( this, data );
     }
 
-    private Class getDefaultMapClass( OgnlContext context ) {
+    private Class getDefaultMapClass( OgnlContext context )
+    {
         Class defaultMapClass = defaultMapClassMap.get( context );
-        if (defaultMapClass != null) {
+        if ( defaultMapClass != null )
+        {
             return defaultMapClass;
         }
 



Mime
View raw message