commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: svn commit: r1188675 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java
Date Tue, 25 Oct 2011 19:58:13 GMT
2011/10/25  <mcucchiara@apache.org>:
> 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>( );

Didn't we agree on using maven codestyle as defined in the check style
configuration in the pom ?
If I remember well for this point, your commit is wrong: no need of spaces here.


>
>     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;
>         }
>
>
>
>



-- 
Olivier Lamy
Talend : http://talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message