You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by am...@apache.org on 2010/04/20 11:37:52 UTC

svn commit: r935846 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Author: amilas
Date: Tue Apr 20 09:37:51 2010
New Revision: 935846

URL: http://svn.apache.org/viewvc?rev=935846&view=rev
Log:
if the package name is started with java.util then  index of it returns 0 and hence the condition won't evaluate to false. It is enough to
check index of < 0. 

Modified:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=935846&r1=935845&r2=935846&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Tue Apr 20 09:37:51 2010
@@ -511,9 +511,9 @@ public class DefaultSchemaGenerator impl
             eltOuter.setQName(schemaTypeName);
 
             Class<?> sup = javaType.getSuperclass();
-            if ((sup != null) && !("java.lang.Object".compareTo(sup.getName()) == 0) &&
-                    !(getQualifiedName(sup.getPackage()).indexOf("org.apache.axis2") > 0)
-                    && !(getQualifiedName(sup.getPackage()).indexOf("java.util") > 0))
+            if ((sup != null) && ("java.lang.Object".compareTo(sup.getName()) != 0) &&
+                    (getQualifiedName(sup.getPackage()).indexOf("org.apache.axis2") < 0)
+                    && (getQualifiedName(sup.getPackage()).indexOf("java.util") < 0))
             {
                 String superClassName = sup.getName();
                 String superclassname = getSimpleClassName(sup);