You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2012/01/13 17:14:39 UTC

svn commit: r1231153 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java

Author: mukulg
Date: Fri Jan 13 16:14:39 2012
New Revision: 1231153

URL: http://svn.apache.org/viewvc?rev=1231153&view=rev
Log:
minor improvement to one of the classes. there were few unnecessary cast operations, which are now likely improved.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java?rev=1231153&r1=1231152&r2=1231153&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java Fri Jan 13 16:14:39 2012
@@ -461,8 +461,7 @@ public class XSSimpleTypeDecl implements
     }
 
     //Create a new simple type for list.
-    protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable,
-            XSObjectList annotations) {
+    protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl itemType, boolean isImmutable, XSObjectList annotations) {
         fBase = fAnySimpleType;
         fTypeName = name;
         fTargetNamespace = uri;
@@ -470,7 +469,7 @@ public class XSSimpleTypeDecl implements
         fAnnotations = annotations;
 
         fVariety = VARIETY_LIST;
-        fItemType = (XSSimpleTypeDecl)itemType;
+        fItemType = itemType;
         fValidationDV = DV_LIST;
         fFacetsDefined = FACET_WHITESPACE;
         fFixedFacet = FACET_WHITESPACE;
@@ -571,8 +570,7 @@ public class XSSimpleTypeDecl implements
     }
 
     //set values for list.
-    protected XSSimpleTypeDecl setListValues(String name, String uri, short finalSet, XSSimpleTypeDecl itemType,
-            XSObjectList annotations) {
+    protected XSSimpleTypeDecl setListValues(String name, String uri, short finalSet, XSSimpleTypeDecl itemType, XSObjectList annotations) {
         //decline to do anything if the object is immutable.
         if(fIsImmutable) return null;
         fBase = fAnySimpleType;
@@ -583,7 +581,7 @@ public class XSSimpleTypeDecl implements
         fAnnotations = annotations;
 
         fVariety = VARIETY_LIST;
-        fItemType = (XSSimpleTypeDecl)itemType;
+        fItemType = itemType;
         fValidationDV = DV_LIST;
         fFacetsDefined = FACET_WHITESPACE;
         fFixedFacet = FACET_WHITESPACE;
@@ -2863,7 +2861,7 @@ public class XSSimpleTypeDecl implements
                 ((ancestorNS == null && type.getNamespace() == null) ||
                         (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) &&   // compare with ancestor
                         type != fAnySimpleType) {  // reached anySimpleType
-            type = (XSTypeDefinition)type.getBaseType();
+            type = type.getBaseType();
         }
 
         return type != fAnySimpleType;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org