commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1519844 - in /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl: ASTCtor.java ASTStaticMethod.java OgnlRuntime.java
Date Tue, 03 Sep 2013 20:43:45 GMT
Author: grobmeier
Date: Tue Sep  3 20:43:44 2013
New Revision: 1519844

URL: http://svn.apache.org/r1519844
Log:
removed unnecessary null checks

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/ASTStaticMethod.java
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.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=1519844&r1=1519843&r2=1519844&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 Tue Sep 
3 20:43:44 2013
@@ -158,7 +158,7 @@ public class ASTCtor
             ctorValue = this.getValueBody( context, target );
             context.setCurrentObject( ctorValue );
 
-            if ( clazz != null && ctorValue != null )
+            if ( ctorValue != null )
             {
 
                 context.setCurrentType( ctorValue.getClass() );

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=1519844&r1=1519843&r2=1519844&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 Tue
Sep  3 20:43:44 2013
@@ -91,7 +91,7 @@ public class ASTStaticMethod
             Class clazz = OgnlRuntime.classForName( context, className );
             Method m = OgnlRuntime.getMethod( context, clazz, methodName, children, true
);
 
-            if ( clazz == null || m == null )
+            if ( m == null )
             {
                 throw new UnsupportedCompilationException(
                     "Unable to find class/method combo " + className + " / " + methodName
);

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java?rev=1519844&r1=1519843&r2=1519844&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java Tue Sep
 3 20:43:44 2013
@@ -949,10 +949,6 @@ public class OgnlRuntime
         try
         {
             Class<?> targetClass = classForName( context, className );
-            if ( targetClass == null )
-            {
-                throw new ClassNotFoundException( "Unable to resolve class with name " +
className );
-            }
 
             MethodAccessor methodAccessor = getMethodAccessor( targetClass );
 
@@ -1297,12 +1293,6 @@ public class OgnlRuntime
         {
             Class<?> clazz = classForName( context, className );
 
-            if ( clazz == null )
-            {
-                throw new OgnlException(
-                    "Unable to find class " + className + " when resolving field name of
" + fieldName );
-            }
-
             /*
              * Check for virtual static field "class"; this cannot interfere with normal
static fields because it is a
              * reserved word.



Mime
View raw message