commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1185014 - in /commons/proper/ognl/trunk/src: main/java/org/apache/commons/ognl/ test/java/org/apache/commons/ognl/test/objects/
Date Mon, 17 Oct 2011 06:08:58 GMT
Author: grobmeier
Date: Mon Oct 17 06:08:58 2011
New Revision: 1185014

URL: http://svn.apache.org/viewvc?rev=1185014&view=rev
Log:
OGNL-11: fixed checkstyle errors

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ArrayPropertyAccessor.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/DynamicSubscript.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ElementsAccessor.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Evaluation.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/ExpressionNode.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JJTOgnlParserState.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaSource.java
    commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java Mon Oct 17 06:08:58 2011
@@ -369,7 +369,7 @@ public class ASTCtor
         return "";
     }
 
-    public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data)
+    public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
         throws OgnlException
     {
         return visitor.visit( this, data );

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java Mon Oct 17 06:08:58 2011
@@ -45,7 +45,8 @@ public class ASTInstanceof
         this.targetType = targetType;
     }
 
-    String getTargetType() {
+    String getTargetType() 
+    {
         return targetType;
     }
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java Mon Oct 17 06:08:58 2011
@@ -36,11 +36,11 @@ public class ASTProperty
     extends SimpleNode
     implements NodeType
 {
-    private boolean _indexedAccess = false;
+    private boolean indexedAccess = false;
 
-    private Class _getterClass;
+    private Class getterClass;
 
-    private Class _setterClass;
+    private Class setterClass;
 
     public ASTProperty( int id )
     {
@@ -49,20 +49,26 @@ public class ASTProperty
 
     public void setIndexedAccess( boolean value )
     {
-        _indexedAccess = value;
+        indexedAccess = value;
     }
 
     /**
      * Returns true if this property is itself an index reference.
+     * @return Returns true if this property is itself an index reference. 
      */
     public boolean isIndexedAccess()
     {
-        return _indexedAccess;
+        return indexedAccess;
     }
 
     /**
      * Returns true if this property is described by an IndexedPropertyDescriptor and that if followed by an index
      * specifier it will call the index get/set methods rather than go through property accessors.
+     * 
+     * @param context The context
+     * @param source The object source
+     * @throws OgnlException if an error occurs
+     * @return true, if this property is described by an IndexedPropertyDescriptor
      */
     public int getIndexedPropertyType( OgnlContext context, Object source )
         throws OgnlException
@@ -77,10 +83,10 @@ public class ASTProperty
 
                 if ( property instanceof String )
                 {
-                    return OgnlRuntime.getIndexedPropertyType( context,
-                                                               ( source == null ) ? null
-                                                                               : OgnlRuntime.getCompiler().getInterfaceClass( source.getClass() ),
-                                                               (String) property );
+                    return OgnlRuntime.getIndexedPropertyType( 
+                          context,
+                          ( source == null ) ? null : OgnlRuntime.getCompiler().getInterfaceClass( source.getClass() ),
+                          (String) property );
                 }
             }
 
@@ -126,24 +132,26 @@ public class ASTProperty
     public boolean isNodeSimpleProperty( OgnlContext context )
         throws OgnlException
     {
-        return ( _children != null ) && ( _children.length == 1 ) && ( (SimpleNode) _children[0] ).isConstant( context );
+        return ( _children != null ) && ( _children.length == 1 ) 
+            && ( (SimpleNode) _children[0] ).isConstant( context );
     }
 
     public Class getGetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public Class getSetterClass()
     {
-        return _setterClass;
+        return setterClass;
     }
 
     public String toGetSourceString( OgnlContext context, Object target )
     {
         if ( context.getCurrentObject() == null )
+        {
             throw new UnsupportedCompilationException( "Current target is null." );
-
+        }
         String result = "";
         Method m = null;
 
@@ -160,9 +168,10 @@ public class ASTProperty
                 Object value = _children[0].getValue( context, context.getRoot() );
 
                 if ( value == null || DynamicSubscript.class.isAssignableFrom( value.getClass() ) )
+                {
                     throw new UnsupportedCompilationException(
-                                                               "Value passed as indexed property was null or not supported." );
-
+                        "Value passed as indexed property was null or not supported." );
+                }
                 // Get root cast string if the child is a type that needs it (like a nested ASTProperty)
 
                 String srcString = _children[0].toGetSourceString( context, context.getRoot() );
@@ -173,26 +182,31 @@ public class ASTProperty
                 {
                     String cast = (String) context.remove( ExpressionCompiler.PRE_CAST );
                     if ( cast != null )
+                    {
                         srcString = cast + srcString;
+                    }
                 }
 
-                if ( ASTConst.class.isInstance( _children[0] ) && String.class.isInstance( context.getCurrentObject() ) )
+                if ( ASTConst.class.isInstance( _children[0] ) 
+                     && String.class.isInstance( context.getCurrentObject() ) )
+                {
                     srcString = "\"" + srcString + "\"";
-
+                }
                 // System.out.println("indexed getting with child srcString: " + srcString + " value class: " +
                 // value.getClass() + " and child: " + _children[0].getClass());
 
                 if ( context.get( "_indexedMethod" ) != null )
                 {
                     m = (Method) context.remove( "_indexedMethod" );
-                    _getterClass = m.getReturnType();
+                    getterClass = m.getReturnType();
 
-                    Object indexedValue = OgnlRuntime.callMethod( context, target, m.getName(), new Object[] { value } );
+                    Object indexedValue = 
+                        OgnlRuntime.callMethod( context, target, m.getName(), new Object[] { value } );
 
-                    context.setCurrentType( _getterClass );
+                    context.setCurrentType( getterClass );
                     context.setCurrentObject( indexedValue );
-                    context.setCurrentAccessor( OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m,
-                                                                                                    m.getDeclaringClass() ) );
+                    context.setCurrentAccessor( 
+                        OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
 
                     return "." + m.getName() + "(" + srcString + ")";
                 }
@@ -226,10 +240,12 @@ public class ASTProperty
 
                     if ( ASTConst.class.isInstance( _children[0] )
                         && Number.class.isInstance( context.getCurrentObject() ) )
-                        context.setCurrentType( OgnlRuntime.getPrimitiveWrapperClass( context.getCurrentObject().getClass() ) );
-
+                    {
+                        context.setCurrentType( 
+                            OgnlRuntime.getPrimitiveWrapperClass( context.getCurrentObject().getClass() ) );
+                    }
                     result = p.getSourceAccessor( context, target, srcString );
-                    _getterClass = context.getCurrentType();
+                    getterClass = context.getCurrentType();
                     context.setCurrentObject( indexVal );
 
                     return result;
@@ -239,7 +255,8 @@ public class ASTProperty
             String name = ( (ASTConst) _children[0] ).getValue().toString();
 
             if ( !Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() )
-                || ( Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() ) && name.indexOf( "next" ) < 0 ) )
+                || ( Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() ) 
+                     && name.indexOf( "next" ) < 0 ) )
             {
                 Object currObj = target;
 
@@ -286,9 +303,13 @@ public class ASTProperty
                 else
                 {
                     if ( pd instanceof ObjectIndexedPropertyDescriptor )
+                    {
                         m = ( (ObjectIndexedPropertyDescriptor) pd ).getIndexedReadMethod();
+                    }
                     else
+                    {
                         throw new OgnlException( "property '" + name + "' is not an indexed property" );
+                    }
                 }
 
                 if ( _parent == null )
@@ -298,7 +319,7 @@ public class ASTProperty
                     m = OgnlRuntime.getReadMethod( context.getCurrentObject().getClass(), name );
 
                     result = m.getName() + "()";
-                    _getterClass = m.getReturnType();
+                    getterClass = m.getReturnType();
                 }
                 else
                 {
@@ -330,7 +351,7 @@ public class ASTProperty
                         }
                         else
                         {
-                            _getterClass = int.class;
+                            getterClass = int.class;
                             context.setCurrentAccessor( context.getCurrentObject().getClass() );
                             context.setCurrentType( int.class );
                             result = "." + name;
@@ -353,16 +374,17 @@ public class ASTProperty
                         String srcString = _children[0].toGetSourceString( context, context.getRoot() );
 
                         if ( ASTConst.class.isInstance( _children[0] )
-                            && String.class.isInstance( context.getCurrentObject() ) )
+                            && String.class.isInstance( context.getCurrentObject() ) ) 
+                        {
                             srcString = "\"" + srcString + "\"";
-
+                        }
                         context.setCurrentObject( currObj );
                         context.setCurrentType( currType );
                         context.setPreviousType( prevType );
 
                         result = pa.getSourceAccessor( context, context.getCurrentObject(), srcString );
 
-                        _getterClass = context.getCurrentType();
+                        getterClass = context.getCurrentType();
                     }
                 }
             }
@@ -377,10 +399,11 @@ public class ASTProperty
 
         if ( m != null )
         {
-            _getterClass = m.getReturnType();
+            getterClass = m.getReturnType();
 
             context.setCurrentType( m.getReturnType() );
-            context.setCurrentAccessor( OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
+            context.setCurrentAccessor( 
+                OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
         }
 
         context.setCurrentObject( target );
@@ -408,8 +431,9 @@ public class ASTProperty
         Method m = null;
 
         if ( context.getCurrentObject() == null )
+        {
             throw new UnsupportedCompilationException( "Current target is null." );
-
+        }
         /*
          * System.out.println("astproperty(setter) is indexed? : " + isIndexedAccess() + " child: " +
          * _children[0].getClass().getName() + " target: " + target.getClass().getName() + " children length: " +
@@ -424,9 +448,11 @@ public class ASTProperty
                 Object value = _children[0].getValue( context, context.getRoot() );
 
                 if ( value == null )
+                {
                     throw new UnsupportedCompilationException(
-                                                               "Value passed as indexed property is null, can't enhance statement to bytecode." );
-
+                        "Value passed as indexed property is null, can't enhance statement to bytecode." );
+                }
+                
                 String srcString = _children[0].toGetSourceString( context, context.getRoot() );
                 srcString =
                     ExpressionCompiler.getRootExpression( _children[0], context.getRoot(), context ) + srcString;
@@ -435,10 +461,13 @@ public class ASTProperty
                 {
                     String cast = (String) context.remove( ExpressionCompiler.PRE_CAST );
                     if ( cast != null )
+                    {
                         srcString = cast + srcString;
+                    }
                 }
 
-                if ( ASTConst.class.isInstance( _children[0] ) && String.class.isInstance( context.getCurrentObject() ) )
+                if ( ASTConst.class.isInstance( _children[0] ) 
+                     && String.class.isInstance( context.getCurrentObject() ) )
                 {
                     srcString = "\"" + srcString + "\"";
                 }
@@ -457,19 +486,22 @@ public class ASTProperty
                         m = getIndexedWriteMethod( pd );
 
                         if ( m == null )
+                        {
                             throw new UnsupportedCompilationException(
-                                                                       "Indexed property has no corresponding write method." );
+                                "Indexed property has no corresponding write method." );
+                        }
                     }
 
-                    _setterClass = m.getParameterTypes()[0];
+                    setterClass = m.getParameterTypes()[0];
 
                     Object indexedValue = null;
                     if ( !lastChild )
+                    {
                         indexedValue = OgnlRuntime.callMethod( context, target, m.getName(), new Object[] { value } );
-
-                    context.setCurrentType( _setterClass );
-                    context.setCurrentAccessor( OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m,
-                                                                                                    m.getDeclaringClass() ) );
+                    }
+                    context.setCurrentType( setterClass );
+                    context.setCurrentAccessor( 
+                        OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
 
                     if ( !lastChild )
                     {
@@ -499,8 +531,10 @@ public class ASTProperty
 
                     if ( ASTConst.class.isInstance( _children[0] )
                         && Number.class.isInstance( context.getCurrentObject() ) )
-                        context.setCurrentType( OgnlRuntime.getPrimitiveWrapperClass( context.getCurrentObject().getClass() ) );
-
+                    {
+                        context.setCurrentType( 
+                            OgnlRuntime.getPrimitiveWrapperClass( context.getCurrentObject().getClass() ) );
+                    }
                     result =
                         lastChild( context ) ? p.getSourceSetter( context, target, srcString )
                                         : p.getSourceAccessor( context, target, srcString );
@@ -511,7 +545,7 @@ public class ASTProperty
                      */
 
                     // result = p.getSourceAccessor(context, target, srcString);
-                    _getterClass = context.getCurrentType();
+                    getterClass = context.getCurrentType();
                     context.setCurrentObject( indexVal );
 
                     /*
@@ -532,7 +566,8 @@ public class ASTProperty
             // context.getCurrentObject().getClass().getName());
 
             if ( !Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() )
-                || ( Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() ) && name.indexOf( "next" ) < 0 ) )
+                || ( Iterator.class.isAssignableFrom( context.getCurrentObject().getClass() ) 
+                     && name.indexOf( "next" ) < 0 ) )
             {
 
                 Object currObj = target;
@@ -551,6 +586,7 @@ public class ASTProperty
                     }
                     catch ( NoSuchPropertyException ex )
                     {
+                        // TODO: how to handle this accordingly?
                     }
                 }
                 finally
@@ -561,8 +597,9 @@ public class ASTProperty
             }
 
             PropertyDescriptor pd =
-                OgnlRuntime.getPropertyDescriptor( OgnlRuntime.getCompiler().getInterfaceClass( context.getCurrentObject().getClass() ),
-                                                   name );
+                OgnlRuntime.getPropertyDescriptor( 
+                    OgnlRuntime.getCompiler().getInterfaceClass( 
+                        context.getCurrentObject().getClass() ), name );
 
             if ( pd != null )
             {
@@ -609,7 +646,7 @@ public class ASTProperty
                     String cast = parm.isArray() ? ExpressionCompiler.getCastString( parm ) : parm.getName();
 
                     result = m.getName() + "((" + cast + ")$3)";
-                    _setterClass = parm;
+                    setterClass = parm;
                 }
                 else
                 {
@@ -628,8 +665,9 @@ public class ASTProperty
                  */
 
                 if ( target != null )
-                    _setterClass = target.getClass();
-
+                {
+                    setterClass = target.getClass();
+                }
                 if ( _parent != null && pd != null && pa == null )
                 {
                     m = pd.getReadMethod();
@@ -668,7 +706,7 @@ public class ASTProperty
                             result = pa.getSourceSetter( context, context.getCurrentObject(), srcString );
                         }
 
-                        _getterClass = context.getCurrentType();
+                        getterClass = context.getCurrentType();
                     }
                 }
             }
@@ -684,7 +722,8 @@ public class ASTProperty
         if ( m != null )
         {
             context.setCurrentType( m.getReturnType() );
-            context.setCurrentAccessor( OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
+            context.setCurrentAccessor( 
+                OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
         }
 
         return result;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java Mon Oct 17 06:08:58 2011
@@ -54,26 +54,36 @@ public class ASTRootVarRef
     public String toGetSourceString( OgnlContext context, Object target )
     {
         if ( target != null )
-            _getterClass = target.getClass();
-
-        if ( _getterClass != null )
+        {
+            getterClass = target.getClass();
+        }
+        
+        if ( getterClass != null )
         {
 
-            context.setCurrentType( _getterClass );
+            context.setCurrentType( getterClass );
         }
 
-        if ( _parent == null || ( _getterClass != null && _getterClass.isArray() ) )
+        if ( _parent == null || ( getterClass != null && getterClass.isArray() ) )
+        {
             return "";
+        }
         else
+        {
             return ExpressionCompiler.getRootExpression( this, target, context );
+        }
     }
 
     public String toSetSourceString( OgnlContext context, Object target )
     {
-        if ( _parent == null || ( _getterClass != null && _getterClass.isArray() ) )
+        if ( _parent == null || ( getterClass != null && getterClass.isArray() ) )
+        {
             return "";
+        }
         else
+        {
             return "$3";
+        }
     }
     
     public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java Mon Oct 17 06:08:58 2011
@@ -57,7 +57,9 @@ class ASTSelect
             Object next = e.nextElement();
 
             if ( OgnlOps.booleanValue( expr.getValue( context, next ) ) )
+            {
                 answer.add( next );
+            }
         }
 
         return answer;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java Mon Oct 17 06:08:58 2011
@@ -31,11 +31,11 @@ public class ASTSequence
     extends SimpleNode
     implements NodeType, OrderedReturn
 {
-    private Class _getterClass;
+    private Class getterClass;
 
-    private String _lastExpression;
+    private String lastExpression;
 
-    private String _coreExpression;
+    private String coreExpression;
 
     public ASTSequence( int id )
     {
@@ -77,7 +77,7 @@ public class ASTSequence
 
     public Class getGetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public Class getSetterClass()
@@ -87,12 +87,12 @@ public class ASTSequence
 
     public String getLastExpression()
     {
-        return _lastExpression;
+        return lastExpression;
     }
 
     public String getCoreExpression()
     {
-        return _coreExpression;
+        return coreExpression;
     }
 
     public String toSetSourceString( OgnlContext context, Object target )
@@ -104,7 +104,7 @@ public class ASTSequence
     {
         String result = "";
 
-        NodeType _lastType = null;
+        NodeType lastType = null;
 
         for ( int i = 0; i < _children.length; ++i )
         {
@@ -121,8 +121,10 @@ public class ASTSequence
             {
                 String pre = (String) context.get( "_currentChain" );
                 if ( pre == null )
+                {
                     pre = "";
-
+                }
+                
                 seqValue =
                     ExpressionCompiler.getRootExpression( _children[i], context.getRoot(), context ) + pre + seqValue;
                 context.setCurrentAccessor( context.getRoot().getClass() );
@@ -130,24 +132,29 @@ public class ASTSequence
 
             if ( ( i + 1 ) >= _children.length )
             {
-                _coreExpression = result;
-                _lastExpression = seqValue;
+                coreExpression = result;
+                lastExpression = seqValue;
             }
 
             if ( seqValue != null && seqValue.trim().length() > 0 && ( i + 1 ) < _children.length )
+            {
                 result += seqValue + ";";
+            }
             else if ( seqValue != null && seqValue.trim().length() > 0 )
+            {
                 result += seqValue;
-
+            }
             // set last known type from last child with a type
 
             if ( NodeType.class.isInstance( _children[i] ) && ( (NodeType) _children[i] ).getGetterClass() != null )
-                _lastType = (NodeType) _children[i];
+            {
+                lastType = (NodeType) _children[i];
+            }
         }
 
-        if ( _lastType != null )
+        if ( lastType != null )
         {
-            _getterClass = _lastType.getGetterClass();
+            getterClass = lastType.getGetterClass();
         }
 
         return result;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java Mon Oct 17 06:08:58 2011
@@ -36,7 +36,7 @@ public class ASTStaticField
 
     private String fieldName;
 
-    private Class _getterClass;
+    private Class getterClass;
 
     public ASTStaticField( int id )
     {
@@ -88,8 +88,9 @@ public class ASTStaticField
                 Field f = c.getField( fieldName );
 
                 if ( !Modifier.isStatic( f.getModifiers() ) )
+                {
                     throw new OgnlException( "Field " + fieldName + " of class " + className + " is not static" );
-
+                }
                 result = Modifier.isFinal( f.getModifiers() );
             }
         }
@@ -107,8 +108,10 @@ public class ASTStaticField
         }
 
         if ( reason != null )
+        {
             throw new OgnlException( "Could not get static field " + fieldName + " from class " + className, reason );
-
+        }
+        
         return result;
     }
 
@@ -157,12 +160,12 @@ public class ASTStaticField
 
     public Class getGetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public Class getSetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public String toGetSourceString( OgnlContext context, Object target )
@@ -174,9 +177,9 @@ public class ASTStaticField
 
             context.setCurrentObject( obj );
 
-            _getterClass = getFieldClass( context );
+            getterClass = getFieldClass( context );
 
-            context.setCurrentType( _getterClass );
+            context.setCurrentType( getterClass );
 
         }
         catch ( Throwable t )
@@ -196,9 +199,9 @@ public class ASTStaticField
 
             context.setCurrentObject( obj );
 
-            _getterClass = getFieldClass( context );
+            getterClass = getFieldClass( context );
 
-            context.setCurrentType( _getterClass );
+            context.setCurrentType( getterClass );
 
         }
         catch ( Throwable t )

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java Mon Oct 17 06:08:58 2011
@@ -33,11 +33,11 @@ public class ASTStaticMethod
     implements NodeType
 {
 
-    private String _className;
+    private String className;
 
-    private String _methodName;
+    private String methodName;
 
-    private Class _getterClass;
+    private Class getterClass;
 
     public ASTStaticMethod( int id )
     {
@@ -52,8 +52,8 @@ public class ASTStaticMethod
     /** Called from parser action. */
     void init( String className, String methodName )
     {
-        _className = className;
-        _methodName = methodName;
+        this.className = className;
+        this.methodName = methodName;
     }
 
     protected Object getValueBody( OgnlContext context, Object source )
@@ -65,9 +65,11 @@ public class ASTStaticMethod
         try
         {
             for ( int i = 0, icount = args.length; i < icount; ++i )
+            {
                 args[i] = _children[i].getValue( context, root );
-
-            return OgnlRuntime.callStaticMethod( context, _className, _methodName, args );
+            }
+            
+            return OgnlRuntime.callStaticMethod( context, className, methodName, args );
         }
         finally
         {
@@ -77,33 +79,35 @@ public class ASTStaticMethod
 
     public Class getGetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public Class getSetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public String toGetSourceString( OgnlContext context, Object target )
     {
-        String result = _className + "#" + _methodName + "(";
+        String result = className + "#" + methodName + "(";
 
         try
         {
-            Class clazz = OgnlRuntime.classForName( context, _className );
-            Method m = OgnlRuntime.getMethod( context, clazz, _methodName, _children, true );
+            Class clazz = OgnlRuntime.classForName( context, className );
+            Method m = OgnlRuntime.getMethod( context, clazz, methodName, _children, true );
 
             if ( clazz == null || m == null )
-                throw new UnsupportedCompilationException( "Unable to find class/method combo " + _className + " / "
-                    + _methodName );
-
-            if ( !context.getMemberAccess().isAccessible( context, clazz, m, _methodName ) )
+            {
+                throw new UnsupportedCompilationException( "Unable to find class/method combo " + className + " / "
+                    + methodName );
+            }
+            
+            if ( !context.getMemberAccess().isAccessible( context, clazz, m, methodName ) )
             {
                 throw new UnsupportedCompilationException(
-                                                           "Method is not accessible, check your jvm runtime security settings. "
-                                                               + "For static class method " + _className + " / "
-                                                               + _methodName );
+                               "Method is not accessible, check your jvm runtime security settings. "
+                                   + "For static class method " + className + " / "
+                                   + methodName );
             }
 
             if ( ( _children != null ) && ( _children.length > 0 ) )
@@ -123,8 +127,10 @@ public class ASTStaticMethod
                     String parmString = _children[i].toGetSourceString( context, context.getRoot() );
 
                     if ( parmString == null || parmString.trim().length() < 1 )
+                    {
                         parmString = "null";
-
+                    }
+                    
                     // to undo type setting of constants when used as method parameters
                     if ( ASTConst.class.isInstance( _children[i] ) )
                     {
@@ -141,28 +147,34 @@ public class ASTStaticMethod
                     }
 
                     if ( cast == null )
+                    {
                         cast = "";
-
+                    }
+                    
                     if ( !ASTConst.class.isInstance( _children[i] ) )
+                    {
                         parmString = cast + parmString;
-
+                    }
+                    
                     Class valueClass = value != null ? value.getClass() : null;
                     if ( NodeType.class.isAssignableFrom( _children[i].getClass() ) )
+                    {
                         valueClass = ( (NodeType) _children[i] ).getGetterClass();
-
+                    }
+                    
                     if ( valueClass != parms[i] )
                     {
                         if ( parms[i].isArray() )
                         {
                             parmString =
                                 OgnlRuntime.getCompiler().createLocalReference( context,
-                                                                                "("
-                                                                                    + ExpressionCompiler.getCastString( parms[i] )
-                                                                                    + ")org.apache.commons.ognl.OgnlOps.toArray("
-                                                                                    + parmString
-                                                                                    + ", "
-                                                                                    + parms[i].getComponentType().getName()
-                                                                                    + ".class, true)", parms[i] );
+                                                                "("
+                                                                    + ExpressionCompiler.getCastString( parms[i] )
+                                                                    + ")org.apache.commons.ognl.OgnlOps.toArray("
+                                                                    + parmString
+                                                                    + ", "
+                                                                    + parms[i].getComponentType().getName()
+                                                                    + ".class, true)", parms[i] );
 
                         }
                         else if ( parms[i].isPrimitive() )
@@ -171,30 +183,31 @@ public class ASTStaticMethod
 
                             parmString =
                                 OgnlRuntime.getCompiler().createLocalReference( context,
-                                                                                "(("
-                                                                                    + wrapClass.getName()
-                                                                                    + ")org.apache.commons.ognl.OgnlOps.convertValue("
-                                                                                    + parmString
-                                                                                    + ","
-                                                                                    + wrapClass.getName()
-                                                                                    + ".class, true))."
-                                                                                    + OgnlRuntime.getNumericValueGetter( wrapClass ),
-                                                                                parms[i] );
+                                                            "(("
+                                                                + wrapClass.getName()
+                                                                + ")org.apache.commons.ognl.OgnlOps.convertValue("
+                                                                + parmString
+                                                                + ","
+                                                                + wrapClass.getName()
+                                                                + ".class, true))."
+                                                                + OgnlRuntime.getNumericValueGetter( wrapClass ),
+                                                            parms[i] );
 
                         }
                         else if ( parms[i] != Object.class )
                         {
                             parmString =
                                 OgnlRuntime.getCompiler().createLocalReference( context,
-                                                                                "("
-                                                                                    + parms[i].getName()
-                                                                                    + ")org.apache.commons.ognl.OgnlOps.convertValue("
-                                                                                    + parmString + ","
-                                                                                    + parms[i].getName() + ".class)",
-                                                                                parms[i] );
+                                                            "("
+                                                                + parms[i].getName()
+                                                                + ")org.apache.commons.ognl.OgnlOps.convertValue("
+                                                                + parmString + ","
+                                                                + parms[i].getName() + ".class)",
+                                                            parms[i] );
                         }
                         else if ( ( NodeType.class.isInstance( _children[i] )
-                            && ( (NodeType) _children[i] ).getGetterClass() != null && Number.class.isAssignableFrom( ( (NodeType) _children[i] ).getGetterClass() ) )
+                            && ( (NodeType) _children[i] ).getGetterClass() != null 
+                            && Number.class.isAssignableFrom( ( (NodeType) _children[i] ).getGetterClass() ) )
                             || valueClass.isPrimitive() )
                         {
                             parmString = " ($w) " + parmString;
@@ -223,11 +236,11 @@ public class ASTStaticMethod
 
             if ( m != null )
             {
-                _getterClass = m.getReturnType();
+                getterClass = m.getReturnType();
 
                 context.setCurrentType( m.getReturnType() );
-                context.setCurrentAccessor( OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m,
-                                                                                                m.getDeclaringClass() ) );
+                context.setCurrentAccessor( 
+                    OgnlRuntime.getCompiler().getSuperOrInterfaceClass( m, m.getDeclaringClass() ) );
             }
 
         }
@@ -258,7 +271,7 @@ public class ASTStaticMethod
      */
     public String getClassName()
     {
-        return _className;
+        return className;
     }
 
     /**
@@ -269,6 +282,6 @@ public class ASTStaticMethod
      */
     public String getMethodName()
     {
-        return _methodName;
+        return methodName;
     }
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java Mon Oct 17 06:08:58 2011
@@ -63,12 +63,16 @@ class ASTTest
     public String toGetSourceString( OgnlContext context, Object target )
     {
         if ( target == null )
+        {
             throw new UnsupportedCompilationException( "evaluation resulted in null expression." );
-
+        }
+        
         if ( _children.length != 3 )
+        {
             throw new UnsupportedCompilationException( "Can only compile test expressions with two children."
                 + _children.length );
-
+        }
+        
         String result = "";
 
         try
@@ -76,8 +80,10 @@ class ASTTest
 
             String first = OgnlRuntime.getChildSource( context, target, _children[0] );
             if ( !OgnlRuntime.isBoolean( first ) && !context.getCurrentType().isPrimitive() )
+            {
                 first = OgnlRuntime.getCompiler().createLocalReference( context, first, context.getCurrentType() );
-
+            }
+            
             if ( ExpressionNode.class.isInstance( _children[0] ) )
             {
                 first = "(" + first + ")";
@@ -87,8 +93,10 @@ class ASTTest
             Class secondType = context.getCurrentType();
 
             if ( !OgnlRuntime.isBoolean( second ) && !context.getCurrentType().isPrimitive() )
+            {
                 second = OgnlRuntime.getCompiler().createLocalReference( context, second, context.getCurrentType() );
-
+            }
+            
             if ( ExpressionNode.class.isInstance( _children[1] ) )
             {
                 second = "(" + second + ")";
@@ -98,7 +106,11 @@ class ASTTest
             Class thirdType = context.getCurrentType();
 
             if ( !OgnlRuntime.isBoolean( third ) && !context.getCurrentType().isPrimitive() )
+            {
                 third = OgnlRuntime.getCompiler().createLocalReference( context, third, context.getCurrentType() );
+            
+            }
+            
             if ( ExpressionNode.class.isInstance( _children[2] ) )
             {
                 third = "(" + third + ")";

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java Mon Oct 17 06:08:58 2011
@@ -32,13 +32,13 @@ public class ASTVarRef
     implements NodeType, OrderedReturn
 {
 
-    private String _name;
+    private String name;
 
-    protected Class _getterClass;
+    protected Class getterClass;
 
-    protected String _core;
+    protected String core;
 
-    protected String _last;
+    protected String last;
 
     public ASTVarRef( int id )
     {
@@ -52,7 +52,7 @@ public class ASTVarRef
 
     void setName( String name )
     {
-        this._name = name;
+        this.name = name;
     }
     /**
      * Get the variable name.
@@ -62,24 +62,24 @@ public class ASTVarRef
      */
     String getName()
     {
-        return _name;
+        return name;
     }
 
     protected Object getValueBody( OgnlContext context, Object source )
         throws OgnlException
     {
-        return context.get( _name );
+        return context.get( name );
     }
 
     protected void setValueBody( OgnlContext context, Object target, Object value )
         throws OgnlException
     {
-        context.put( _name, value );
+        context.put( name, value );
     }
 
     public Class getGetterClass()
     {
-        return _getterClass;
+        return getterClass;
     }
 
     public Class getSetterClass()
@@ -89,33 +89,35 @@ public class ASTVarRef
 
     public String getCoreExpression()
     {
-        return _core;
+        return core;
     }
 
     public String getLastExpression()
     {
-        return _last;
+        return last;
     }
 
     public String toGetSourceString( OgnlContext context, Object target )
     {
-        Object value = context.get( _name );
+        Object value = context.get( name );
 
         if ( value != null )
         {
 
-            _getterClass = value.getClass();
+            getterClass = value.getClass();
         }
 
-        context.setCurrentType( _getterClass );
+        context.setCurrentType( getterClass );
         context.setCurrentAccessor( context.getClass() );
 
         context.setCurrentObject( value );
-        // context.setRoot(context.get(_name));
+        // context.setRoot(context.get(name));
 
         if ( context.getCurrentObject() == null )
+        {
             throw new UnsupportedCompilationException( "Current context object is null, can't compile var reference." );
-
+        }
+        
         String pre = "";
         String post = "";
         if ( context.getCurrentType() != null )
@@ -126,13 +128,13 @@ public class ASTVarRef
 
         if ( _parent != null && ASTAssign.class.isInstance( _parent ) )
         {
-            _core = "$1.put(\"" + _name + "\",";
-            _last = pre + "$1.get(\"" + _name + "\")" + post;
+            core = "$1.put(\"" + name + "\",";
+            last = pre + "$1.get(\"" + name + "\")" + post;
 
-            return _core;
+            return core;
         }
 
-        return pre + "$1.get(\"" + _name + "\")" + post;
+        return pre + "$1.get(\"" + name + "\")" + post;
     }
 
     public String toSetSourceString( OgnlContext context, Object target )
@@ -140,7 +142,7 @@ public class ASTVarRef
         return toGetSourceString( context, target );
     }
 
-    public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data)
+    public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
         throws OgnlException
     {
         return visitor.visit( this, data );

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=1185014&r1=1185013&r2=1185014&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 Mon Oct 17 06:08:58 2011
@@ -73,6 +73,7 @@ public class ArrayPropertyAccessor
                     case DynamicSubscript.LAST:
                         index = new Integer( ( len > 0 ) ? ( len - 1 ) : -1 );
                         break;
+                    default: break;
                 }
             }
             if ( result == null )
@@ -134,6 +135,7 @@ public class ArrayPropertyAccessor
                     case DynamicSubscript.LAST:
                         index = new Integer( ( len > 0 ) ? ( len - 1 ) : -1 );
                         break;
+                    default: break;
                 }
             }
         }
@@ -207,7 +209,8 @@ public class ArrayPropertyAccessor
             indexStr = "org.apache.commons.ognl.OgnlOps#getIntValue(" + indexStr + toString + ")";
         }
 
-        Class<? extends Object> type = target.getClass().isArray() ? target.getClass().getComponentType() : target.getClass();
+        Class<? extends Object> type = 
+            target.getClass().isArray() ? target.getClass().getComponentType() : target.getClass();
 
         context.setCurrentAccessor( target.getClass() );
         context.setCurrentType( target.getClass().getComponentType() );

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=1185014&r1=1185013&r2=1185014&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 Mon Oct 17 06:08:58 2011
@@ -40,9 +40,9 @@ public class DefaultClassResolver
     public Class<?> classForName( String className, Map<String, Object> context )
         throws ClassNotFoundException
     {
-        Class<?> result = null;
+        Class<?> result = classes.get( className );
 
-        if ( ( result = classes.get( className ) ) == null )
+        if ( result == null )
         {
             try
             {

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DynamicSubscript.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DynamicSubscript.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DynamicSubscript.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/DynamicSubscript.java Mon Oct 17 06:08:58 2011
@@ -37,13 +37,13 @@ public class DynamicSubscript
 
     public static final int ALL = 3;
 
-    public static final DynamicSubscript first = new DynamicSubscript( FIRST );
+    public static final DynamicSubscript DS_FIRST = new DynamicSubscript( FIRST );
 
-    public static final DynamicSubscript mid = new DynamicSubscript( MID );
+    public static final DynamicSubscript DS_MID = new DynamicSubscript( MID );
 
-    public static final DynamicSubscript last = new DynamicSubscript( LAST );
+    public static final DynamicSubscript DS_LAST = new DynamicSubscript( LAST );
 
-    public static final DynamicSubscript all = new DynamicSubscript( ALL );
+    public static final DynamicSubscript DS_ALL = new DynamicSubscript( ALL );
 
     private int flag;
 

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ElementsAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ElementsAccessor.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ElementsAccessor.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ElementsAccessor.java Mon Oct 17 06:08:58 2011
@@ -41,6 +41,5 @@ public interface ElementsAccessor
      * @return an iterator over the elements of the given object
      * @exception OgnlException if there is an error getting the given object's elements
      */
-    public Enumeration<?> getElements( Object target )
-        throws OgnlException;
+    Enumeration<?> getElements( Object target ) throws OgnlException;
 }

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Evaluation.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Evaluation.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Evaluation.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Evaluation.java Mon Oct 17 06:08:58 2011
@@ -225,7 +225,8 @@ public class Evaluation
     {
         if ( firstChild == null )
         {
-            firstChild = lastChild = child;
+            firstChild = child;
+            lastChild = child;
         }
         else
         {

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=1185014&r1=1185013&r2=1185014&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 Mon Oct 17 06:08:58 2011
@@ -46,7 +46,8 @@ public final class EvaluationPool
         {
             evaluations.add( new Evaluation( null, null ) );
         }
-        created = size = initialSize;
+        created = initialSize;
+        size = initialSize;
     }
 
     /**

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ExpressionNode.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ExpressionNode.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ExpressionNode.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ExpressionNode.java Mon Oct 17 06:08:58 2011
@@ -85,8 +85,7 @@ public abstract class ExpressionNode
     {
         StringBuilder result =
             new StringBuilder(
-                               ( _parent == null || NumericExpression.class.isAssignableFrom( _parent.getClass() ) ) ? ""
-                                               : "(" );
+                ( _parent == null || NumericExpression.class.isAssignableFrom( _parent.getClass() ) ) ? "" : "(" );
 
         if ( ( _children != null ) && ( _children.length > 0 ) )
         {
@@ -111,12 +110,16 @@ public abstract class ExpressionNode
                     }
 
                     if ( pre == null )
+                    {
                         pre = "";
-
+                    }
+                    
                     String cast = (String) context.remove( ExpressionCompiler.PRE_CAST );
                     if ( cast == null )
+                    {
                         cast = "";
-
+                    }
+                    
                     value =
                         cast + ExpressionCompiler.getRootExpression( _children[i], context.getRoot(), context ) + pre
                             + value;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JJTOgnlParserState.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JJTOgnlParserState.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JJTOgnlParserState.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JJTOgnlParserState.java Mon Oct 17 06:08:58 2011
@@ -1,5 +1,4 @@
 /*
- * $Id$
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -17,9 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 /* Generated By:JavaCC: Do not edit this line. JJTOgnlParserState.java Version 4.1d1 */
 package org.apache.commons.ognl;
 
+/**
+ * $Id$
+ */
 public class JJTOgnlParserState
 {
     private java.util.List nodes;

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaSource.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaSource.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaSource.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaSource.java Mon Oct 17 06:08:58 2011
@@ -19,8 +19,6 @@ package org.apache.commons.ognl;
  * under the License.
  */
 
-import org.apache.commons.ognl.enhance.ExpressionAccessor;
-
 /**
  * Defines an object that can return a representation of itself and any objects it contains in the form of a
  * {@link String} embedded with literal java statements.

Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java?rev=1185014&r1=1185013&r2=1185014&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java (original)
+++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Root.java Mon Oct 17 06:08:58 2011
@@ -127,7 +127,7 @@ public class Root
         map.put( "array", array );
         map.put( "list", list );
         map.put( "size", new Integer( 5000 ) );
-        map.put( DynamicSubscript.first, new Integer( 99 ) );
+        map.put( DynamicSubscript.DS_FIRST, new Integer( 99 ) );
         map.put( "baz", array );
         map.put( "value", new Bean2() );
         map.put( "bar", new Bean3() );



Mime
View raw message