< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java

Print this page

        

@@ -1,10 +1,8 @@
 /*
  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
- * @LastModified: Oct 2017
- * @modifiedBy: Oracle Inc.
- * @modifiedOn: Nov 2015, Sept 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.

@@ -619,11 +617,11 @@
      * this component. This method may return null if no features
      * are recognized by this component.
      */
     @Override
     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.

@@ -656,11 +654,11 @@
      * this component. This method may return null if no properties
      * are recognized by this component.
      */
     @Override
     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.

@@ -1770,11 +1768,11 @@
             if (xpointer != null ) {
                 fChildConfig = fXPointerChildConfig ;
 
                 // Parse the XPointer expression
                 try {
-                    ((XPointerProcessor)fXPtrProcessor).parseXPointer(xpointer);
+                    fXPtrProcessor.parseXPointer(xpointer);
 
                 } catch (XNIException ex) {
                     // report the XPointer error as a resource error
                     reportResourceError(
                             "XMLResourceError",

@@ -1801,11 +1799,11 @@
                 }
 
                 // If the xpointer attribute is present
                 if (xpointer != null ) {
                         // and it was not resolved
-                        if (!((XPointerProcessor)fXPtrProcessor).isXPointerResolved()) {
+                        if (!fXPtrProcessor.isXPointerResolved()) {
                         Locale locale = (fErrorReporter != null) ? fErrorReporter.getLocale() : null;
                         String reason = fXIncludeMessageFormatter.formatMessage(locale, "XPointerResolutionUnsuccessful", null);
                         reportResourceError("XMLResourceError", new Object[] {href, reason});
                                 // use the fallback
                                 return false;

@@ -2839,13 +2837,13 @@
     protected void restoreBaseURI() {
         fBaseURI.pop();
         fLiteralSystemID.pop();
         fExpandedSystemID.pop();
         fBaseURIScope.pop();
-        fCurrentBaseURI.setBaseSystemId((String)fBaseURI.peek());
-        fCurrentBaseURI.setLiteralSystemId((String)fLiteralSystemID.peek());
-        fCurrentBaseURI.setExpandedSystemId((String)fExpandedSystemID.peek());
+        fCurrentBaseURI.setBaseSystemId(fBaseURI.peek());
+        fCurrentBaseURI.setLiteralSystemId(fLiteralSystemID.peek());
+        fCurrentBaseURI.setExpandedSystemId(fExpandedSystemID.peek());
     }
 
     // The following methods are used for language processing
 
     /**

@@ -2862,11 +2860,11 @@
      * Discards the language at the top of the stack, and returns the one beneath it.
      */
     public String restoreLanguage() {
         fLanguageStack.pop();
         fLanguageScope.pop();
-        return (String) fLanguageStack.peek();
+        return fLanguageStack.peek();
     }
 
     /**
      * Gets the base URI that was in use at that depth
      * @param depth
< prev index next >