commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1126250 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
Date Sun, 22 May 2011 22:32:16 GMT
Author: simonetripodi
Date: Sun May 22 22:32:16 2011
New Revision: 1126250

URL: http://svn.apache.org/viewvc?rev=1126250&view=rev
Log:
removed unneeded else statement

Modified:
    incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java?rev=1126250&r1=1126249&r2=1126250&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java Sun May 22
22:32:16 2011
@@ -1761,26 +1761,23 @@ public class OgnlRuntime
             {
                 throw new NoSuchFieldException( propertyName );
             }
-            else
+            try
             {
-                try
-                {
-                    Object state = null;
-
-                    if ( !Modifier.isStatic( f.getModifiers() ) )
-                    {
-                        state = context.getMemberAccess().setup( context, target, f, propertyName
);
-                        result = f.get( target );
-                        context.getMemberAccess().restore( context, target, f, propertyName,
state );
-                    }
-                    else
-                        throw new NoSuchFieldException( propertyName );
+                Object state = null;
 
-                }
-                catch ( IllegalAccessException ex )
+                if ( !Modifier.isStatic( f.getModifiers() ) )
                 {
-                    throw new NoSuchFieldException( propertyName );
+                    state = context.getMemberAccess().setup( context, target, f, propertyName
);
+                    result = f.get( target );
+                    context.getMemberAccess().restore( context, target, f, propertyName,
state );
                 }
+                else
+                    throw new NoSuchFieldException( propertyName );
+
+            }
+            catch ( IllegalAccessException ex )
+            {
+                throw new NoSuchFieldException( propertyName );
             }
         }
         return result;



Mime
View raw message