< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java

Print this page

        

@@ -1,8 +1,8 @@
 /*
  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.

@@ -570,11 +570,11 @@
      * Returns a list of feature identifiers that are recognized by
      * this component. This method may return null if no features
      * are recognized by this component.
      */
     public String[] getRecognizedFeatures() {
-        return (String[]) (RECOGNIZED_FEATURES.clone());
+        return RECOGNIZED_FEATURES.clone();
     } // getRecognizedFeatures():String[]
 
     /**
      * Sets the state of a feature. This method is called by the component
      * manager any time after reset when a feature changes state.

@@ -597,11 +597,11 @@
      * Returns a list of property identifiers that are recognized by
      * this component. This method may return null if no properties
      * are recognized by this component.
      */
     public String[] getRecognizedProperties() {
-        return (String[]) (RECOGNIZED_PROPERTIES.clone());
+        return RECOGNIZED_PROPERTIES.clone();
     } // getRecognizedProperties():String[]
 
     /**
      * Sets the value of a property. This method is called by the component
      * manager any time after reset when a property changes value.

@@ -3035,11 +3035,11 @@
                     continue;
                 } else {
                     // 5 Let [Definition:]  the wild IDs be the set of all attribute information item to which clause 3.2 applied and whose validation resulted in a context-determined declaration of mustFind or no context-determined declaration at all, and whose [local name] and [namespace name] resolve (as defined by QName resolution (Instance) (3.15.4)) to an attribute declaration whose {type definition} is or is derived from ID. Then all of the following must be true:
                     // 5.1 There must be no more than one item in wild IDs.
                     if (currDecl.fType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE
-                        && ((XSSimpleType) currDecl.fType).isIDType()) {
+                        && (currDecl.fType).isIDType()) {
                         if (wildcardIDName != null) {
                             reportSchemaError(
                                 "cvc-complex-type.5.1",
                                 new Object[] { element.rawname, currDecl.fName, wildcardIDName });
                         } else

@@ -4118,11 +4118,11 @@
             }
         }
 
         private ShortList getItemValueTypeAt(int index) {
             if (fUseItemValueTypeVector) {
-                return (ShortList) fItemValueTypes.get(index);
+                return fItemValueTypes.get(index);
             }
             return fItemValueType;
         }
 
         private boolean itemValueTypeContains(ShortList value) {

@@ -4243,12 +4243,11 @@
             // do all the necessary management...
             super.endDocumentFragment();
 
             // verify references
             // get the key store corresponding (if it exists):
-            fKeyValueStore =
-                (ValueStoreBase) fValueStoreCache.fGlobalIDConstraintMap.get(
+            fKeyValueStore = fValueStoreCache.fGlobalIDConstraintMap.get(
                     ((KeyRef) fIdentityConstraint).getKey());
 
             if (fKeyValueStore == null) {
                 // report error
                 String code = "KeyRefOutOfScope";
< prev index next >