commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1197440 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java
Date Fri, 04 Nov 2011 09:03:22 GMT
Author: mcucchiara
Date: Fri Nov  4 09:03:22 2011
New Revision: 1197440

URL: http://svn.apache.org/viewvc?rev=1197440&view=rev
Log:
Fixed code style

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java?rev=1197440&r1=1197439&r2=1197440&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java
(original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.java
Fri Nov  4 09:03:22 2011
@@ -145,7 +145,7 @@ public class ArrayPropertyAccessor
     @Override
     public String getSourceAccessor( OgnlContext context, Object target, Object index )
     {
-        String indexStr = getIndexString(context, index);
+        String indexStr = getIndexString( context, index );
 
         context.setCurrentAccessor( target.getClass() );
         context.setCurrentType( target.getClass().getComponentType() );
@@ -156,7 +156,7 @@ public class ArrayPropertyAccessor
     @Override
     public String getSourceSetter( OgnlContext context, Object target, Object index )
     {
-        String indexStr = getIndexString(context, index);
+        String indexStr = getIndexString( context, index );
 
         Class<?> type = target.getClass().isArray() ? target.getClass().getComponentType()
: target.getClass();
 
@@ -173,7 +173,8 @@ public class ArrayPropertyAccessor
         return "[" + indexStr + "]=org.apache.commons.ognl.OgnlOps.convertValue($3," + type.getName()
+ ".class)";
     }
 
-    private static String getIndexString( OgnlContext context, Object index ) {
+    private static String getIndexString( OgnlContext context, Object index )
+    {
         String indexStr = index.toString();
 
         // need to convert to primitive for list index access
@@ -186,9 +187,8 @@ public class ArrayPropertyAccessor
         {
             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
 



Mime
View raw message