changeset 45853:bfa06be36a17

8181154: Fix lint warnings in JAXP repo: deprecation Reviewed-by: lancea, dfuchs
author joehw
date Mon, 10 Jul 2017 10:22:36 -0700
parents aa0a2d22981d
children e78871064ddf
files jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/virtual_parse_stack.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIAttrNSImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeUseImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSElementDecl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ShortHandPointer.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java jaxp/src/java.xml/share/classes/javax/xml/datatype/FactoryFinder.java jaxp/src/java.xml/share/classes/javax/xml/datatype/SecuritySupport.java jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParser.java jaxp/src/java.xml/share/classes/javax/xml/parsers/SecuritySupport.java jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java jaxp/src/java.xml/share/classes/javax/xml/transform/SecuritySupport.java jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryFinder.java jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java jaxp/src/java.xml/share/classes/org/xml/sax/helpers/NewInstance.java jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java jaxp/src/java.xml/share/classes/org/xml/sax/helpers/SecuritySupport.java jaxp/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java
diffstat 103 files changed, 498 insertions(+), 576 deletions(-) [+]
line wrap: on
line diff
--- a/jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/virtual_parse_stack.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime/virtual_parse_stack.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -114,7 +114,7 @@
       real_next++;
 
       /* put the state number from the Symbol onto the virtual stack */
-      vstack.push(new Integer(stack_sym.parse_state));
+      vstack.push(stack_sym.parse_state);
     }
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
@@ -161,7 +161,7 @@
   /** Push a state number onto the stack. */
   public void push(int state_num)
     {
-      vstack.push(new Integer(state_num));
+      vstack.push(state_num);
     }
 
   /*-----------------------------------------------------------*/
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -104,6 +103,6 @@
   /** @return Double object
    */
   public Object getConstantValue(ConstantPool cp) {
-    return new Double(bytes);
+    return bytes;
   }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -103,6 +102,6 @@
   /** @return Float object
    */
   public Object getConstantValue(ConstantPool cp) {
-    return new Float(bytes);
+    return bytes;
   }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -109,6 +108,6 @@
   /** @return Integer object
    */
   public Object getConstantValue(ConstantPool cp) {
-    return new Integer(bytes);
+    return bytes;
   }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -101,6 +100,6 @@
   /** @return Long object
    */
   public Object getConstantValue(ConstantPool cp) {
-    return new Long(bytes);
+    return bytes;
   }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -425,7 +424,7 @@
     }
 
     if(debug != null)
-      JavaClass.debug = new Boolean(debug).booleanValue();
+      JavaClass.debug = Boolean.valueOf(debug);
 
     if(sep != null)
       try {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BIPUSH.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -72,7 +71,7 @@
     b      = bytes.readByte();
   }
 
-  public Number getValue() { return new Integer(b); }
+  public Number getValue() { return Integer.valueOf(b); }
 
   /** @return Type.BYTE
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/DCONST.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -52,7 +51,7 @@
     value = f;
   }
 
-  public Number getValue() { return new Double(value); }
+  public Number getValue() { return Double.valueOf(value); }
 
   /** @return Type.DOUBLE
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FCONST.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -54,7 +53,7 @@
     value = f;
   }
 
-  public Number getValue() { return new Float(value); }
+  public Number getValue() { return Float.valueOf(value); }
 
   /** @return Type.FLOAT
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -95,56 +94,56 @@
     checkType(Type.LONG);
 
     if(l != 0L)
-      value = new Long(l);
+      value = Long.valueOf(l);
   }
 
   public void setInitValue(int i) {
     checkType(Type.INT);
 
     if(i != 0)
-      value = new Integer(i);
+      value = Integer.valueOf(i);
   }
 
   public void setInitValue(short s) {
     checkType(Type.SHORT);
 
     if(s != 0)
-      value = new Integer(s);
+      value = Integer.valueOf(s);
   }
 
   public void setInitValue(char c) {
     checkType(Type.CHAR);
 
     if(c != 0)
-      value = new Integer(c);
+      value = Integer.valueOf(c);
   }
 
   public void setInitValue(byte b) {
     checkType(Type.BYTE);
 
     if(b != 0)
-      value = new Integer(b);
+      value = Integer.valueOf(b);
   }
 
   public void setInitValue(boolean b) {
     checkType(Type.BOOLEAN);
 
     if(b)
-      value = new Integer(1);
+      value = Integer.valueOf(1);
   }
 
   public void setInitValue(float f) {
     checkType(Type.FLOAT);
 
     if(f != 0.0)
-      value = new Float(f);
+      value = Float.valueOf(f);
   }
 
   public void setInitValue(double d) {
     checkType(Type.DOUBLE);
 
     if(d != 0.0)
-      value = new Double(d);
+      value = Double.valueOf(d);
   }
 
   /** Remove any initial value.
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -50,7 +49,7 @@
     value = i;
   }
 
-  public Number getValue() { return new Integer(value); }
+  public Number getValue() { return Integer.valueOf(value); }
 
   /** @return Type.INT
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,7 +22,6 @@
 
 
 import com.sun.org.apache.bcel.internal.Constants;
-import com.sun.org.apache.bcel.internal.classfile.Utility;
 import com.sun.org.apache.bcel.internal.classfile.ConstantPool;
 import java.io.*;
 import com.sun.org.apache.bcel.internal.util.ByteSequence;
@@ -165,7 +163,7 @@
     }
 
     try {
-      obj = (Instruction)clazz.newInstance();
+      obj = (Instruction)clazz.getConstructor().newInstance();
 
       if(wide && !((obj instanceof LocalVariableInstruction) ||
                    (obj instanceof IINC) ||
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -455,7 +454,7 @@
 
       Instruction i = null;
       try {
-        i = (Instruction)java.lang.Class.forName(name).newInstance();
+        i = (Instruction)java.lang.Class.forName(name).getConstructor().newInstance();
       } catch(Exception e) {
         throw new RuntimeException("Could not find instruction: " + name);
       }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCONST.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -52,7 +51,7 @@
     value = l;
   }
 
-  public Number getValue() { return new Long(value); }
+  public Number getValue() { return Long.valueOf(value); }
 
   /** @return Type.LONG
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -96,10 +95,10 @@
         return ((com.sun.org.apache.bcel.internal.classfile.ConstantUtf8)c).getBytes();
 
     case com.sun.org.apache.bcel.internal.Constants.CONSTANT_Float:
-        return new Float(((com.sun.org.apache.bcel.internal.classfile.ConstantFloat)c).getBytes());
+        return Float.valueOf(((com.sun.org.apache.bcel.internal.classfile.ConstantFloat)c).getBytes());
 
     case com.sun.org.apache.bcel.internal.Constants.CONSTANT_Integer:
-        return new Integer(((com.sun.org.apache.bcel.internal.classfile.ConstantInteger)c).getBytes());
+        return Integer.valueOf(((com.sun.org.apache.bcel.internal.classfile.ConstantInteger)c).getBytes());
 
     default: // Never reached
       throw new RuntimeException("Unknown or invalid constant type at " + index);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC2_W.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -55,10 +54,10 @@
 
     switch(c.getTag()) {
     case com.sun.org.apache.bcel.internal.Constants.CONSTANT_Long:
-        return new Long(((com.sun.org.apache.bcel.internal.classfile.ConstantLong)c).getBytes());
+        return Long.valueOf(((com.sun.org.apache.bcel.internal.classfile.ConstantLong)c).getBytes());
 
     case com.sun.org.apache.bcel.internal.Constants.CONSTANT_Double:
-        return new Double(((com.sun.org.apache.bcel.internal.classfile.ConstantDouble)c).getBytes());
+        return Double.valueOf(((com.sun.org.apache.bcel.internal.classfile.ConstantDouble)c).getBytes());
 
     default: // Never reached
       throw new RuntimeException("Unknown or invalid constant type at " + index);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SIPUSH.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -69,7 +68,7 @@
     b      = bytes.readShort();
   }
 
-  public Number getValue() { return new Integer(b); }
+  public Number getValue() { return Integer.valueOf(b); }
 
   /** @return Type.SHORT
    */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -172,7 +171,7 @@
     static long getLastModified(final File f) {
         return ((Long) AccessController.doPrivileged(new PrivilegedAction() {
             public Object run() {
-                return new Long(f.lastModified());
+                return f.lastModified();
             }
         })).longValue();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltMath.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -375,7 +374,7 @@
 
      if (value != null)
      {
-       int bits = new Double(precision).intValue();
+       int bits = (int)precision;
 
        if (bits <= value.length())
          value = value.substring(0, bits);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -124,7 +123,7 @@
         ClassLoader cl = System.getSecurityManager()!=null ? null : findClassLoader();
         try{
             Class providerClass = findProviderClass(className, cl, doFallback);
-            Object instance = providerClass.newInstance();
+            Object instance = providerClass.getConstructor().newInstance();
             debugPrintln(()->"created new instance of " + providerClass +
                              " using ClassLoader: " + cl);
             return instance;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -177,7 +176,7 @@
     static long getLastModified(final File f) {
         return ((Long) AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return f.lastModified();
                     }
                 })).longValue();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1005,7 +1005,7 @@
         if (className != null) {
             try {
                 final Class<?> clazz = ObjectFactory.findProviderClass(className, true);
-                node = (SyntaxTreeNode)clazz.newInstance();
+                node = (SyntaxTreeNode)clazz.getDeclaredConstructor().newInstance();
                 node.setQName(qname);
                 node.setParser(this);
                 if (_locator != null) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -875,7 +874,7 @@
                                         case -21:
                                                 break;
                                         case 21:
-                                                { return newSymbol(sym.INT, new Long(yytext())); }
+                                                { return newSymbol(sym.INT, Long.valueOf(yytext())); }
                                         case -22:
                                                 break;
                                         case 22:
@@ -903,7 +902,7 @@
                                         case -28:
                                                 break;
                                         case 28:
-                                                { return newSymbol(sym.REAL, new Double(yytext())); }
+                                                { return newSymbol(sym.REAL, Double.valueOf(yytext())); }
                                         case -29:
                                                 break;
                                         case 29:
@@ -929,7 +928,7 @@
                                         case -34:
                                                 break;
                                         case 34:
-                                                { return newSymbol(sym.REAL, new Double(yytext())); }
+                                                { return newSymbol(sym.REAL, Double.valueOf(yytext())); }
                                         case -35:
                                                 break;
                                         case 35:
@@ -1057,11 +1056,11 @@
                                         case -66:
                                                 break;
                                         case 67:
-                                                { return newSymbol(sym.INT, new Long(yytext())); }
+                                                { return newSymbol(sym.INT, Long.valueOf(yytext())); }
                                         case -67:
                                                 break;
                                         case 68:
-                                                { return newSymbol(sym.REAL, new Double(yytext())); }
+                                                { return newSymbol(sym.REAL, Double.valueOf(yytext())); }
                                         case -68:
                                                 break;
                                         case 70:
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathParser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1342,7 +1342,7 @@
           case 120: // NodeTest ::= PI
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.PI);
+                 RESULT = Integer.valueOf(NodeTest.PI);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1371,7 +1371,7 @@
           case 118: // NodeTest ::= COMMENT
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.COMMENT);
+                 RESULT = Integer.valueOf(NodeTest.COMMENT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1380,7 +1380,7 @@
           case 117: // NodeTest ::= TEXT
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.TEXT);
+                 RESULT = Integer.valueOf(NodeTest.TEXT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1389,7 +1389,7 @@
           case 116: // NodeTest ::= NODE
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.ANODE);
+                 RESULT = Integer.valueOf(NodeTest.ANODE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(25/*NodeTest*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1815,7 +1815,7 @@
           case 96: // AxisName ::= SELF
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.SELF);
+                 RESULT = Integer.valueOf(Axis.SELF);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1824,7 +1824,7 @@
           case 95: // AxisName ::= PRECEDINGSIBLING
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.PRECEDINGSIBLING);
+                 RESULT = Integer.valueOf(Axis.PRECEDINGSIBLING);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1833,7 +1833,7 @@
           case 94: // AxisName ::= PRECEDING
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.PRECEDING);
+                 RESULT = Integer.valueOf(Axis.PRECEDING);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1842,7 +1842,7 @@
           case 93: // AxisName ::= PARENT
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.PARENT);
+                 RESULT = Integer.valueOf(Axis.PARENT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1851,7 +1851,7 @@
           case 92: // AxisName ::= NAMESPACE
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.NAMESPACE);
+                 RESULT = Integer.valueOf(Axis.NAMESPACE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1860,7 +1860,7 @@
           case 91: // AxisName ::= FOLLOWINGSIBLING
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.FOLLOWINGSIBLING);
+                 RESULT = Integer.valueOf(Axis.FOLLOWINGSIBLING);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1869,7 +1869,7 @@
           case 90: // AxisName ::= FOLLOWING
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.FOLLOWING);
+                 RESULT = Integer.valueOf(Axis.FOLLOWING);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1878,7 +1878,7 @@
           case 89: // AxisName ::= DESCENDANTORSELF
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.DESCENDANTORSELF);
+                 RESULT = Integer.valueOf(Axis.DESCENDANTORSELF);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1887,7 +1887,7 @@
           case 88: // AxisName ::= DESCENDANT
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.DESCENDANT);
+                 RESULT = Integer.valueOf(Axis.DESCENDANT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1896,7 +1896,7 @@
           case 87: // AxisName ::= CHILD
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.CHILD);
+                 RESULT = Integer.valueOf(Axis.CHILD);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1905,7 +1905,7 @@
           case 86: // AxisName ::= ATTRIBUTE
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ATTRIBUTE);
+                 RESULT = Integer.valueOf(Axis.ATTRIBUTE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1914,7 +1914,7 @@
           case 85: // AxisName ::= ANCESTORORSELF
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ANCESTORORSELF);
+                 RESULT = Integer.valueOf(Axis.ANCESTORORSELF);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1923,7 +1923,7 @@
           case 84: // AxisName ::= ANCESTOR
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ANCESTOR);
+                 RESULT = Integer.valueOf(Axis.ANCESTOR);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(40/*AxisName*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -1932,7 +1932,7 @@
           case 83: // AxisSpecifier ::= ATSIGN
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ATTRIBUTE);
+                 RESULT = Integer.valueOf(Axis.ATTRIBUTE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(41/*AxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2697,7 +2697,7 @@
           case 35: // ChildOrAttributeAxisSpecifier ::= ATTRIBUTE DCOLON
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ATTRIBUTE);
+                 RESULT = Integer.valueOf(Axis.ATTRIBUTE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2706,7 +2706,7 @@
           case 34: // ChildOrAttributeAxisSpecifier ::= CHILD DCOLON
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.CHILD);
+                 RESULT = Integer.valueOf(Axis.CHILD);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-1)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2715,7 +2715,7 @@
           case 33: // ChildOrAttributeAxisSpecifier ::= ATSIGN
             {
               Integer RESULT = null;
-                 RESULT = new Integer(Axis.ATTRIBUTE);
+                 RESULT = Integer.valueOf(Axis.ATTRIBUTE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(42/*ChildOrAttributeAxisSpecifier*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2745,7 +2745,7 @@
           case 30: // NodeTestPattern ::= PI
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.PI);
+                 RESULT = Integer.valueOf(NodeTest.PI);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2754,7 +2754,7 @@
           case 29: // NodeTestPattern ::= COMMENT
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.COMMENT);
+                 RESULT = Integer.valueOf(NodeTest.COMMENT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2763,7 +2763,7 @@
           case 28: // NodeTestPattern ::= TEXT
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.TEXT);
+                 RESULT = Integer.valueOf(NodeTest.TEXT);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
@@ -2772,7 +2772,7 @@
           case 27: // NodeTestPattern ::= NODE
             {
               Object RESULT = null;
-                 RESULT = new Integer(NodeTest.ANODE);
+                 RESULT = Integer.valueOf(NodeTest.ANODE);
               CUP$XPathParser$result = new com.sun.java_cup.internal.runtime.Symbol(33/*NodeTestPattern*/, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((com.sun.java_cup.internal.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
             }
           return CUP$XPathParser$result;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -342,7 +342,7 @@
         _elements       = new HashMap<>();
         _attributes     = new HashMap<>();
         _namespaces     = new HashMap<>();
-        _namespaces.put("",new Integer(_nextNSType));
+        _namespaces.put("", _nextNSType);
         _namesIndex     = new Vector(128);
         _namespaceIndex = new Vector(32);
         _namespacePrefixes = new HashMap<>();
@@ -852,7 +852,7 @@
             _namespaces.put(namespaceURI,code);
             _namespaceIndex.addElement(namespaceURI);
         }
-        return code.intValue();
+        return code;
     }
 
     public int nextModeSerial() {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -35,7 +35,7 @@
 import java.io.PrintWriter;
 import java.net.URL;
 import java.net.URLConnection;
-import java.net.URLDecoder;
+import java.nio.file.Paths;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -199,7 +199,7 @@
             // Check for a "file:" URI (courtesy of Brian Ewins)
             if (timestamp == 0){ // get 0 for local URI
                 if ("file".equals(url.getProtocol())){
-                    File localfile = new File(URLDecoder.decode(url.getFile()));
+                    File localfile = Paths.get(url.toURI()).toFile();
                     timestamp = localfile.lastModified();
                 }
             }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java	Mon Jul 10 10:22:36 2017 -0700
@@ -94,7 +94,7 @@
         if (_currentDocumentNode != rootNode) {
             _currentDocumentNode = rootNode;
             _index = new HashMap<>();
-            _rootToIndexMap.put(new Integer(rootNode), _index);
+            _rootToIndexMap.put(rootNode, _index);
         }
 
         IntegerArray nodes = _index.get(value);
@@ -178,7 +178,7 @@
             int ident = _enhancedDOM.getElementById(id);
 
             if (ident != DTM.NULL) {
-                Integer root = new Integer(_enhancedDOM.getDocument());
+                Integer root = _enhancedDOM.getDocument();
                 Map<String, IntegerArray> index = _rootToIndexMap.get(root);
 
                 if (index == null) {
@@ -247,7 +247,7 @@
 
         // Get the mapping table for the document containing the context node
         Map<String, IntegerArray> index =
-            _rootToIndexMap.get(new Integer(rootHandle));
+            _rootToIndexMap.get(rootHandle);
 
         // Split argument to id function into XML whitespace separated tokens
         final StringTokenizer values = new StringTokenizer(string, " \n\t");
@@ -298,7 +298,7 @@
 
         // Get the mapping table for the document containing the context node
         Map<String,IntegerArray> index =
-                    _rootToIndexMap.get(new Integer(rootHandle));
+                    _rootToIndexMap.get(rootHandle);
 
         // Check whether the context node is present in the set of nodes
         // returned by the key function
@@ -701,7 +701,7 @@
             IntegerArray result = null;
 
             // Get mapping from key values/IDs to DTM nodes for this document
-            Map<String, IntegerArray> index = _rootToIndexMap.get(new Integer(root));
+            Map<String, IntegerArray> index = _rootToIndexMap.get(root);
 
             if (!_isKeyIterator) {
                 // For id function, tokenize argument as whitespace separated
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java	Mon Jul 10 10:22:36 2017 -0700
@@ -187,11 +187,11 @@
                                                    translet, _last);
             Double num;
             try {
-                num = new Double(str);
+                num = Double.parseDouble(str);
             }
             // Treat number as NaN if it cannot be parsed as a double
             catch (NumberFormatException e) {
-                num = new Double(Double.NEGATIVE_INFINITY);
+                num = Double.NEGATIVE_INFINITY;
             }
             _values[_scanned++] = num;
             return(num);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -26,6 +26,7 @@
 import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
 import com.sun.org.apache.xml.internal.utils.LocaleUtility;
 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import java.lang.reflect.InvocationTargetException;
 import java.util.Locale;
 import java.text.Collator;
 
@@ -148,10 +149,17 @@
                SecurityException,
                TransletException {
 
-        final NodeSortRecord sortRecord =
-            (NodeSortRecord)_class.newInstance();
-        sortRecord.initialize(node, last, _dom, _sortSettings);
-        return sortRecord;
+        try {
+            final NodeSortRecord sortRecord;
+            //NodeSortRecord subclasses are generated with a public empty constructor
+            // refer to com.sun.org.apache.xalan.internal.xsltc.compiler.Sort::compileInit
+            sortRecord = (NodeSortRecord)_class.getConstructor().newInstance();
+            sortRecord.initialize(node, last, _dom, _sortSettings);
+            return sortRecord;
+        } catch (NoSuchMethodException | IllegalArgumentException |
+                InvocationTargetException ex) {
+            throw new InstantiationException(ex.getMessage());
+        }
     }
 
     public String getClassName() {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -471,7 +471,7 @@
             return 0;
         }
         int eType = getIdForNamespace(s);
-        return _nsIndex.get(new Integer(eType));
+        return _nsIndex.get(eType);
     }
 
 
@@ -672,7 +672,7 @@
 
         for (i=0; i<nsLength; i++) {
             int eType = getIdForNamespace(namespaces[i]);
-            Integer type = _nsIndex.get(new Integer(eType));
+            Integer type = _nsIndex.get(eType);
             if (type != null) {
                 result[type] = (short)i;
             }
@@ -692,7 +692,7 @@
 
         for (i = 0; i < length; i++) {
             int eType = getIdForNamespace(namespaces[i]);
-            Integer type = _nsIndex.get(new Integer(eType));
+            Integer type = _nsIndex.get(eType);
             result[i] = (type == null) ? -1 : type.shortValue();
         }
 
@@ -900,7 +900,7 @@
         this.startElement(uri, localName, qname, attributes);
 
         if (m_buildIdIndex) {
-            _node2Ids.put(node, new Integer(m_parents.peek()));
+            _node2Ids.put(node, m_parents.peek());
         }
     }
 
@@ -979,7 +979,7 @@
         throws SAXException
     {
         // Check if the URI already exists before pushing on stack
-        Integer eType = new Integer(getIdForNamespace(uri));
+        Integer eType = getIdForNamespace(uri);
         if (_nsIndex.get(eType) == null) {
             _nsIndex.put(eType, _uriCount++);
         }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -155,7 +155,7 @@
      * Push a new parameter frame.
      */
     public final void pushParamFrame() {
-        paramsStack.add(pframe, new Integer(pbase));
+        paramsStack.add(pframe, pbase);
         pbase = ++pframe;
     }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/Attributes.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -28,6 +27,7 @@
  * @author Jacek Ambroziak
  * @author Santiago Pericas-Geertsen
  */
+@SuppressWarnings("deprecation")
 public final class Attributes implements AttributeList {
     private int _element;
     private DOM _document;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Mon Jul 10 10:22:36 2017 -0700
@@ -746,11 +746,11 @@
             // If node-boolean comparison -> convert node to boolean
             if (left instanceof Node || right instanceof Node) {
                 if (left instanceof Boolean) {
-                    right = new Boolean(booleanF(right));
+                    right = booleanF(right);
                     hasSimpleArgs = true;
                 }
                 if (right instanceof Boolean) {
-                    left = new Boolean(booleanF(left));
+                    left = booleanF(left);
                     hasSimpleArgs = true;
                 }
             }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -43,6 +43,7 @@
 import java.lang.module.ModuleFinder;
 import java.lang.module.ModuleReference;
 import java.lang.module.ModuleReader;
+import java.lang.reflect.InvocationTargetException;
 import java.security.AccessController;
 import java.security.CodeSigner;
 import java.security.CodeSource;
@@ -549,7 +550,8 @@
 
             // The translet needs to keep a reference to all its auxiliary
             // class to prevent the GC from collecting them
-            AbstractTranslet translet = (AbstractTranslet) _class[_transletIndex].newInstance();
+            AbstractTranslet translet = (AbstractTranslet)
+                    _class[_transletIndex].getConstructor().newInstance();
             translet.postInitialization();
             translet.setTemplates(this);
             translet.setServicesMechnism(_useServicesMechanism);
@@ -560,13 +562,10 @@
 
             return translet;
         }
-        catch (InstantiationException e) {
+        catch (InstantiationException | IllegalAccessException |
+                NoSuchMethodException | InvocationTargetException e) {
             ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name);
-            throw new TransformerConfigurationException(err.toString());
-        }
-        catch (IllegalAccessException e) {
-            ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name);
-            throw new TransformerConfigurationException(err.toString());
+            throw new TransformerConfigurationException(err.toString(), e);
         }
     }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -49,6 +48,7 @@
  * @author Santiago Pericas-Geertsen
  * @author G. Todd Miller
  */
+@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public class TrAXFilter extends XMLFilterImpl {
     private Templates              _templates;
     private TransformerImpl        _transformer;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -55,6 +55,7 @@
  *
  * Added Catalog Support for URI resolution
  */
+@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public final class Util {
 
     public static String baseName(String name) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -25,9 +24,7 @@
 import com.sun.org.apache.xerces.internal.parsers.DTDConfiguration;
 import com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration;
 import com.sun.org.apache.xerces.internal.util.XMLChar;
-import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
-import com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
@@ -345,13 +342,7 @@
          * reference to the default error handler.
          */
         public LSSerializer createLSSerializer() {
-            try {
-                return new com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl();
-            }
-            catch (Exception e) {}
-            // Fall back to Xerces' deprecated serializer if
-            // the Xalan based serializer is unavailable.
-            return new DOMSerializerImpl();
+            return new com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl();
         }
 
         /**
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1473,12 +1473,12 @@
         if (nodeTable == null) {
             nodeTable = new HashMap<>();
             num = --nodeCounter;
-            nodeTable.put(node, new Integer(num));
+            nodeTable.put(node, num);
         } else {
             Integer n = (Integer) nodeTable.get(node);
             if (n == null) {
                 num = --nodeCounter;
-                nodeTable.put(node, new Integer(num));
+                nodeTable.put(node, num);
             } else {
                 num = n.intValue();
             }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1831,7 +1830,7 @@
                                         //       flag to "true" which may overwrite a "false"
                                         //       value from the attribute list.
                                         boolean specified = attr.getSpecified();
-                                        attr.setValue(attrPSVI.getSchemaNormalizedValue());
+                                        attr.setValue(attrPSVI.getSchemaValue().getNormalizedValue());
                                         if (!specified) {
                                                 ((AttrImpl) attr).setSpecified(specified);
                                         }
@@ -1972,7 +1971,7 @@
                                 ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
                         }
                         // include element default content (if one is available)
-                        String normalizedValue = elementPSVI.getSchemaNormalizedValue();
+                        String normalizedValue = elementPSVI.getSchemaValue().getNormalizedValue();
                         if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
                     if (normalizedValue !=null)
                                     elementNode.setTextContent(normalizedValue);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -472,42 +472,6 @@
                 return attrNodeIndex;
         }
 
-    /**
-     * Sets an attribute on an element node.
-     * @deprecated
-     */
-    @Deprecated
-    public int setDeferredAttribute(int elementNodeIndex,
-                                    String attrName, String attrURI,
-                                    String attrValue, boolean specified) {
-        // create attribute
-        int attrNodeIndex = createDeferredAttribute(attrName, attrURI,
-                                                    attrValue, specified);
-        int attrChunk = attrNodeIndex >> CHUNK_SHIFT;
-        int attrIndex  = attrNodeIndex & CHUNK_MASK;
-        // set attribute's parent to element
-        setChunkIndex(fNodeParent, elementNodeIndex, attrChunk, attrIndex);
-
-        int elementChunk     = elementNodeIndex >> CHUNK_SHIFT;
-        int elementIndex     = elementNodeIndex & CHUNK_MASK;
-
-        // get element's last attribute
-        int lastAttrNodeIndex = getChunkIndex(fNodeExtra,
-                                              elementChunk, elementIndex);
-        if (lastAttrNodeIndex != 0) {
-            // add link from new attribute to last attribute
-            setChunkIndex(fNodePrevSib, lastAttrNodeIndex,
-                          attrChunk, attrIndex);
-        }
-        // add link from element to new last attribute
-        setChunkIndex(fNodeExtra, attrNodeIndex,
-                      elementChunk, elementIndex);
-
-        // return node index
-        return attrNodeIndex;
-
-    } // setDeferredAttribute(int,String,String,String,boolean):int
-
     /** Creates an attribute in the table. */
     public int createDeferredAttribute(String attrName, String attrValue,
                                        boolean specified) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIAttrNSImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIAttrNSImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,3 +1,6 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -108,6 +111,7 @@
      * @return The canonical lexical representation of the declaration's {value constraint} value.
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
      */
+    @SuppressWarnings("deprecation")
     public String getSchemaDefault() {
         return fDeclaration == null ? null : fDeclaration.getConstraintValue();
     }
@@ -119,6 +123,7 @@
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
      * @return the normalized value of this item after validation
      */
+    @Deprecated
     public String getSchemaNormalizedValue() {
         return fValue.getNormalizedValue();
     }
@@ -237,6 +242,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValue()
      */
+    @Deprecated
     public Object getActualNormalizedValue() {
         return fValue.getActualValue();
     }
@@ -244,6 +250,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValueType()
      */
+    @Deprecated
     public short getActualNormalizedValueType() {
         return fValue.getActualValueType();
     }
@@ -251,6 +258,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getItemValueTypes()
      */
+    @Deprecated
     public ShortList getItemValueTypes() {
         return fValue.getListValueTypes();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,3 +1,6 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -119,6 +122,7 @@
      * @return The canonical lexical representation of the declaration's {value constraint} value.
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
      */
+    @SuppressWarnings("deprecation")
     public String getSchemaDefault() {
         return fDeclaration == null ? null : fDeclaration.getConstraintValue();
     }
@@ -130,6 +134,7 @@
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
      * @return the normalized value of this item after validation
      */
+    @Deprecated
     public String getSchemaNormalizedValue() {
         return fValue.getNormalizedValue();
     }
@@ -285,6 +290,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValue()
      */
+    @Deprecated
     public Object getActualNormalizedValue() {
         return fValue.getActualValue();
     }
@@ -292,6 +298,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValueType()
      */
+    @Deprecated
     public short getActualNormalizedValueType() {
         return fValue.getActualValueType();
     }
@@ -299,6 +306,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getItemValueTypes()
      */
+    @Deprecated
     public ShortList getItemValueTypes() {
         return fValue.getListValueTypes();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -201,7 +201,7 @@
                     fAttributes.getLength() > fElementAttributeLimit){
                 fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                              "ElementAttributeLimit",
-                                             new Object[]{rawname, new Integer(fElementAttributeLimit) },
+                                             new Object[]{rawname, fElementAttributeLimit },
                                              XMLErrorReporter.SEVERITY_FATAL_ERROR );
             }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -2427,11 +2427,11 @@
         int b1 = b4[1] & 0xFF;
         if (b0 == 0xFE && b1 == 0xFF) {
             // UTF-16, big-endian
-            return new Object [] {"UTF-16BE", new Boolean(true)};
+            return new Object [] {"UTF-16BE", true};
         }
         if (b0 == 0xFF && b1 == 0xFE) {
             // UTF-16, little-endian
-            return new Object [] {"UTF-16LE", new Boolean(false)};
+            return new Object [] {"UTF-16LE", false};
         }
 
         // default to UTF-8 if we don't have enough bytes to make a
@@ -2456,11 +2456,11 @@
         int b3 = b4[3] & 0xFF;
         if (b0 == 0x00 && b1 == 0x00 && b2 == 0x00 && b3 == 0x3C) {
             // UCS-4, big endian (1234)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(true)};
+            return new Object [] {"ISO-10646-UCS-4", true};
         }
         if (b0 == 0x3C && b1 == 0x00 && b2 == 0x00 && b3 == 0x00) {
             // UCS-4, little endian (4321)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(false)};
+            return new Object [] {"ISO-10646-UCS-4", false};
         }
         if (b0 == 0x00 && b1 == 0x00 && b2 == 0x3C && b3 == 0x00) {
             // UCS-4, unusual octet order (2143)
@@ -2476,12 +2476,12 @@
             // UTF-16, big-endian, no BOM
             // (or could turn out to be UCS-2...
             // REVISIT: What should this be?
-            return new Object [] {"UTF-16BE", new Boolean(true)};
+            return new Object [] {"UTF-16BE", true};
         }
         if (b0 == 0x3C && b1 == 0x00 && b2 == 0x3F && b3 == 0x00) {
             // UTF-16, little-endian, no BOM
             // (or could turn out to be UCS-2...
-            return new Object [] {"UTF-16LE", new Boolean(false)};
+            return new Object [] {"UTF-16LE", false};
         }
         if (b0 == 0x4C && b1 == 0x6F && b2 == 0xA7 && b3 == 0x94) {
             // EBCDIC
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -2085,11 +2085,11 @@
         int b1 = b4[1] & 0xFF;
         if (b0 == 0xFE && b1 == 0xFF) {
             // UTF-16, big-endian
-            return new Object [] {"UTF-16BE", new Boolean(true)};
+            return new Object [] {"UTF-16BE", true};
         }
         if (b0 == 0xFF && b1 == 0xFE) {
             // UTF-16, little-endian
-            return new Object [] {"UTF-16LE", new Boolean(false)};
+            return new Object [] {"UTF-16LE", false};
         }
 
         // default to UTF-8 if we don't have enough bytes to make a
@@ -2114,11 +2114,11 @@
         int b3 = b4[3] & 0xFF;
         if (b0 == 0x00 && b1 == 0x00 && b2 == 0x00 && b3 == 0x3C) {
             // UCS-4, big endian (1234)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(true)};
+            return new Object [] {"ISO-10646-UCS-4", true};
         }
         if (b0 == 0x3C && b1 == 0x00 && b2 == 0x00 && b3 == 0x00) {
             // UCS-4, little endian (4321)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(false)};
+            return new Object [] {"ISO-10646-UCS-4", false};
         }
         if (b0 == 0x00 && b1 == 0x00 && b2 == 0x3C && b3 == 0x00) {
             // UCS-4, unusual octet order (2143)
@@ -2134,12 +2134,12 @@
             // UTF-16, big-endian, no BOM
             // (or could turn out to be UCS-2...
             // REVISIT: What should this be?
-            return new Object [] {"UTF-16BE", new Boolean(true)};
+            return new Object [] {"UTF-16BE", true};
         }
         if (b0 == 0x3C && b1 == 0x00 && b2 == 0x3F && b3 == 0x00) {
             // UTF-16, little-endian, no BOM
             // (or could turn out to be UCS-2...
-            return new Object [] {"UTF-16LE", new Boolean(false)};
+            return new Object [] {"UTF-16LE", false};
         }
         if (b0 == 0x4C && b1 == 0x6F && b2 == 0xA7 && b3 == 0x94) {
             // EBCDIC
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMAny.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -108,7 +107,7 @@
 
     public String toString()
     {
-        StringBuffer strRet = new StringBuffer();
+        StringBuilder strRet = new StringBuilder();
         strRet.append("(");
         strRet.append("##any:uri=");
         strRet.append(fURI);
@@ -118,7 +117,7 @@
             strRet.append
             (
                 " (Pos:"
-                + new Integer(fPosition).toString()
+                + fPosition
                 + ")"
             );
         }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/CMLeaf.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -101,7 +100,7 @@
 
     public String toString()
     {
-        StringBuffer strRet = new StringBuffer(fElement.toString());
+        StringBuilder strRet = new StringBuilder(fElement.toString());
         strRet.append(" (");
         strRet.append(fElement.uri);
         strRet.append(',');
@@ -112,7 +111,7 @@
             strRet.append
             (
                 " (Pos:"
-                + new Integer(fPosition).toString()
+                + fPosition
                 + ")"
             );
         }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -684,7 +683,7 @@
                         fTransTable[curState] = makeDefStateList();
 
             /* Optimization(Jan, 2001) */
-                        stateTable.put(newSet, new Integer(curState));
+                        stateTable.put(newSet, curState);
             /* Optimization(Jan, 2001) */
 
                         // We now have a new state to do so bump the count
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -96,7 +95,7 @@
 
     public Object get(int index) {
         if (index >= 0 && index < data.length) {
-            return new Byte(data[index]);
+            return data[index];
         }
         throw new IndexOutOfBoundsException("Index: " + index);
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -129,6 +128,7 @@
      * @return The canonical lexical representation of the declaration's {value constraint} value.
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
      */
+    @SuppressWarnings("deprecation")
     public String getSchemaDefault() {
         return fDeclaration == null ? null : fDeclaration.getConstraintValue();
     }
@@ -140,6 +140,7 @@
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
      * @return the normalized value of this item after validation
      */
+    @Deprecated
     public String getSchemaNormalizedValue() {
         return fValue.getNormalizedValue();
     }
@@ -241,6 +242,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValue()
      */
+    @Deprecated
     public Object getActualNormalizedValue() {
         return fValue.getActualValue();
     }
@@ -248,6 +250,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValueType()
      */
+    @Deprecated
     public short getActualNormalizedValueType() {
         return fValue.getActualValueType();
     }
@@ -255,6 +258,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getItemValueTypes()
      */
+    @Deprecated
     public ShortList getItemValueTypes() {
         return fValue.getListValueTypes();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -154,6 +153,7 @@
      * @return The canonical lexical representation of the declaration's {value constraint} value.
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
      */
+    @SuppressWarnings("deprecation")
     public String getSchemaDefault() {
         return fDeclaration == null ? null : fDeclaration.getConstraintValue();
     }
@@ -165,6 +165,7 @@
      * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
      * @return the normalized value of this item after validation
      */
+    @Deprecated
     public String getSchemaNormalizedValue() {
         return fValue.getNormalizedValue();
     }
@@ -296,6 +297,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValue()
      */
+    @Deprecated
     public Object getActualNormalizedValue() {
         return fValue.getActualValue();
     }
@@ -303,6 +305,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValueType()
      */
+    @Deprecated
     public short getActualNormalizedValueType() {
         return fValue.getActualValueType();
     }
@@ -310,6 +313,7 @@
     /* (non-Javadoc)
      * @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getItemValueTypes()
      */
+    @Deprecated
     public ShortList getItemValueTypes() {
         return fValue.getListValueTypes();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -159,6 +158,7 @@
      * Value constraint: The actual value (with respect to the {type
      * definition}) Should we return Object instead of DOMString?
      */
+    @Deprecated
     public String getConstraintValue() {
         // REVISIT: SCAPI: what's the proper representation
         return getConstraintType() == XSConstants.VC_NONE ?
@@ -195,18 +195,21 @@
         fNamespaceItem = namespaceItem;
     }
 
+    @Deprecated
     public Object getActualVC() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
                fDefault.actualValue;
     }
 
+    @Deprecated
     public short getActualVCType() {
         return getConstraintType() == XSConstants.VC_NONE ?
                XSConstants.UNAVAILABLE_DT :
                fDefault.actualValueType;
     }
 
+    @Deprecated
     public ShortList getItemValueTypes() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeUseImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeUseImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -112,6 +111,7 @@
      * Value Constraint: The actual value (with respect to the {type
      * definition}).
      */
+    @Deprecated
     public String getConstraintValue() {
         // REVISIT: SCAPI: what's the proper representation
         return getConstraintType() == XSConstants.VC_NONE ?
@@ -126,18 +126,21 @@
         return null;
     }
 
+    @Deprecated
     public Object getActualVC() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
                fDefault.actualValue;
     }
 
+    @Deprecated
     public short getActualVCType() {
         return getConstraintType() == XSConstants.VC_NONE ?
                XSConstants.UNAVAILABLE_DT :
                fDefault.actualValueType;
     }
 
+    @Deprecated
     public ShortList getItemValueTypes() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSElementDecl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSElementDecl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -257,6 +256,7 @@
      * A value constraint: The actual value (with respect to the {type
      * definition})
      */
+    @Deprecated
     public String getConstraintValue() {
         // REVISIT: SCAPI: what's the proper representation
         return getConstraintType() == XSConstants.VC_NONE ?
@@ -368,18 +368,21 @@
         fNamespaceItem = namespaceItem;
     }
 
+    @Deprecated
     public Object getActualVC() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
                fDefault.actualValue;
     }
 
+    @Deprecated
     public short getActualVCType() {
         return getConstraintType() == XSConstants.VC_NONE ?
                XSConstants.UNAVAILABLE_DT :
                fDefault.actualValueType;
     }
 
+    @Deprecated
     public ShortList getItemValueTypes() {
         return getConstraintType() == XSConstants.VC_NONE ?
                null :
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/identity/XPathMatcher.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -157,7 +156,8 @@
 
     // a place-holder method; to be overridden by subclasses
     // that care about matching element content.
-    protected void handleContent(XSTypeDefinition type, boolean nillable, Object value, short valueType, ShortList itemValueType) {
+    protected void handleContent(XSTypeDefinition type, boolean nillable,
+            Object value, short valueType, ShortList itemValueType) {
     }
 
     /**
@@ -165,7 +165,8 @@
      * XPath expression. Subclasses can override this method to
      * provide default handling upon a match.
      */
-    protected void matched(Object actualValue, short valueType, ShortList itemValueType, boolean isNil) {
+    protected void matched(Object actualValue, short valueType,
+            ShortList itemValueType, boolean isNil) {
         if (DEBUG_METHODS3) {
             System.out.println(toString()+"#matched(\""+actualValue+"\")");
         }
@@ -255,7 +256,8 @@
             // to look at this step for next time we're called.
             // so first consume all descendants:
             int descendantStep = fCurrentStep[i];
-            while(fCurrentStep[i] < steps.length && steps[fCurrentStep[i]].axis.type == XPath.Axis.DESCENDANT) {
+            while(fCurrentStep[i] < steps.length &&
+                    steps[fCurrentStep[i]].axis.type == XPath.Axis.DESCENDANT) {
                 if (DEBUG_MATCH) {
                     XPath.Step step = steps[fCurrentStep[i]];
                     System.out.println(toString()+" [DESCENDANT] MATCHED!");
@@ -330,9 +332,11 @@
                                 int j=0;
                                 for(; j<i && ((fMatched[j] & MATCHED) != MATCHED); j++);
                                 if(j==i) {
-                                    AttributePSVI attrPSVI = (AttributePSVI)attributes.getAugmentations(aIndex).getItem(Constants.ATTRIBUTE_PSVI);
-                                    fMatchedString = attrPSVI.getActualNormalizedValue();
-                                    matched(fMatchedString, attrPSVI.getActualNormalizedValueType(), attrPSVI.getItemValueTypes(), false);
+                                    AttributePSVI attrPSVI = (AttributePSVI)attributes.
+                                            getAugmentations(aIndex).getItem(Constants.ATTRIBUTE_PSVI);
+                                    fMatchedString = attrPSVI.getSchemaValue().getActualValue();
+                                    matched(fMatchedString, attrPSVI.getSchemaValue().getActualValueType(),
+                                            attrPSVI.getSchemaValue().getListValueTypes(), false);
                                 }
                             }
                             break;
@@ -373,7 +377,8 @@
        * @param value - actual value
        *        the typed value of the content of this element.
        */
-    public void endElement(QName element, XSTypeDefinition type, boolean nillable, Object value, short valueType, ShortList itemValueType) {
+    public void endElement(QName element, XSTypeDefinition type, boolean nillable,
+            Object value, short valueType, ShortList itemValueType) {
         if (DEBUG_METHODS2) {
             System.out.println(toString()+"#endElement("+
                                "element={"+element+"},"+
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -118,7 +118,7 @@
                 System.out.println("nodeCount = " + nodeCount ) ;
                 System.out.println("nodeLimit = " + maxNodeLimit ) ;
             }
-            fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "MaxOccurLimit", new Object[]{ new Integer(maxNodeLimit) }, XMLErrorReporter.SEVERITY_FATAL_ERROR);
+            fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "MaxOccurLimit", new Object[]{ maxNodeLimit }, XMLErrorReporter.SEVERITY_FATAL_ERROR);
             // similarly to entity manager behaviour, take into accont
             // behaviour if continue-after-fatal-error is set.
             nodeCount = 0;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -804,7 +804,7 @@
                         fTransTable[curState] = makeDefStateList();
 
                         /* Optimization(Jan, 2001) */
-                        stateTable.put(newSet, new Integer(curState));
+                        stateTable.put(newSet, curState);
                         /* Optimization(Jan, 2001) */
 
                         // We now have a new state to do so bump the count
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1161,7 +1161,7 @@
             }
         }
 
-        attrValues[ATTIDX_FROMDEFAULT] = new Long(fromDefault);
+        attrValues[ATTIDX_FROMDEFAULT] = fromDefault;
         //attrValues[ATTIDX_OTHERVALUES] = otherValues;
 
         // Check that minOccurs isn't greater than maxOccurs.
@@ -1193,7 +1193,7 @@
                     // maxOccurNodeLimit.
                     int maxOccurNodeLimit = fSchemaHandler.fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT);
                     if (max > maxOccurNodeLimit && !fSchemaHandler.fSecurityManager.isNoLimit(maxOccurNodeLimit)) {
-                        reportSchemaFatalError("MaxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element);
+                        reportSchemaFatalError("MaxOccurLimit", new Object[] {maxOccurNodeLimit}, element);
 
                         // reset max values in case processing continues on error
                         attrValues[ATTIDX_MAXOCCURS] = fXIntPool.getXInt(maxOccurNodeLimit);
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDComplexTypeTraverser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1214,8 +1213,8 @@
         fGlobalStore[fGlobalStorePos++] = fName ;
         fGlobalStore[fGlobalStorePos++] = fTargetNamespace;
         // let's save ourselves a couple of objects...
-        fGlobalStore[fGlobalStorePos++] = new Integer((fDerivedBy << 16) + fFinal);
-        fGlobalStore[fGlobalStorePos++] = new Integer((fBlock << 16) + fContentType);
+        fGlobalStore[fGlobalStorePos++] = (fDerivedBy << 16) + fFinal;
+        fGlobalStore[fGlobalStorePos++] = (fBlock << 16) + fContentType;
         fGlobalStore[fGlobalStorePos++] = fBaseType;
         fGlobalStore[fGlobalStorePos++] = fAttrGrp;
         fGlobalStore[fGlobalStorePos++] = fParticle;
@@ -1229,15 +1228,15 @@
         fParticle = (XSParticleDecl)fGlobalStore[--fGlobalStorePos];
         fAttrGrp = (XSAttributeGroupDecl)fGlobalStore[--fGlobalStorePos];
         fBaseType = (XSTypeDefinition)fGlobalStore[--fGlobalStorePos];
-        int i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
+        int i = ((Integer)(fGlobalStore[--fGlobalStorePos]));
         fBlock = (short)(i >> 16);
         fContentType = (short)i;
-        i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
+        i = ((Integer)(fGlobalStore[--fGlobalStorePos]));
         fDerivedBy = (short)(i >> 16);
         fFinal = (short)i;
         fTargetNamespace = (String)fGlobalStore[--fGlobalStorePos];
         fName = (String)fGlobalStore[--fGlobalStorePos];
-        fIsAbstract = ((Boolean)fGlobalStore[--fGlobalStorePos]).booleanValue();
+        fIsAbstract = ((Boolean)fGlobalStore[--fGlobalStorePos]);
         fComplexTypeDecl = (XSComplexTypeDecl)fGlobalStore[--fGlobalStorePos];
     }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -131,6 +131,7 @@
  * @author Pavani Mukthipudi, Sun Microsystems
  *
  */
+@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public class XSDHandler {
 
     /** Feature identifier: validation. */
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -112,7 +111,7 @@
 
     public Object get(int index) {
         if (index >= 0 && index < fLength) {
-            return new Short(fArray[index]);
+            return fArray[index];
         }
         throw new IndexOutOfBoundsException("Index: " + index);
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -63,6 +63,7 @@
  * @author Edwin Goei
  *
  */
+@SuppressWarnings("deprecation")
 public class SAXParserImpl extends javax.xml.parsers.SAXParser
     implements JAXPConstants, PSVIProvider {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -27,6 +26,7 @@
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.math.RoundingMode;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
@@ -1399,7 +1399,7 @@
             BigDecimal bd = getFieldAsBigDecimal(FIELDS[i]);
             bd = bd.multiply(factor).add(carry);
 
-            buf[i] = bd.setScale(0, BigDecimal.ROUND_DOWN);
+            buf[i] = bd.setScale(0, RoundingMode.DOWN);
 
             bd = bd.subtract(buf[i]);
             if (i == 1) {
@@ -1607,7 +1607,7 @@
                     BigDecimal borrow =
                         buf[i].abs().divide(
                             FACTORS[i - 1],
-                            BigDecimal.ROUND_UP);
+                            RoundingMode.UP);
                     if (buf[i].signum() > 0) {
                         borrow = borrow.negate();
                     }
@@ -1796,7 +1796,7 @@
 
         if (seconds != null) {
             BigDecimal fraction =
-                seconds.subtract(seconds.setScale(0, BigDecimal.ROUND_DOWN));
+                seconds.subtract(seconds.setScale(0, RoundingMode.DOWN));
             int millisec = fraction.movePointRight(3).intValue();
             calendar.add(Calendar.MILLISECOND, millisec * signum);
         }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,23 +25,23 @@
 
 package com.sun.org.apache.xerces.internal.jaxp.datatype;
 
+import com.sun.org.apache.xerces.internal.util.DatatypeMessageFormatter;
+import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.math.RoundingMode;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
 import java.util.TimeZone;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Date;
-import java.util.Locale;
-
 import javax.xml.datatype.DatatypeConstants;
 import javax.xml.datatype.Duration;
 import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.namespace.QName;
-import com.sun.org.apache.xerces.internal.util.DatatypeMessageFormatter;
-import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
 
 /**
  * <p>Representation for W3C XML Schema 1.0 date/time datatypes.
@@ -379,7 +379,7 @@
             throws IllegalArgumentException {
 
         // compute format string for this lexical representation.
-        String format = null;
+        String format;
         String lexRep = lexicalRepresentation;
         final int NOT_FOUND = -1;
         int lexRepLength = lexRep.length();
@@ -525,34 +525,10 @@
             throw new IllegalArgumentException(
                 DatatypeMessageFormatter.formatMessage(null,
                     "InvalidXGCValue-fractional",
-                    new Object[] { year, new Integer(month), new Integer(day),
-                    new Integer(hour), new Integer(minute), new Integer(second),
-                    fractionalSecond, new Integer(timezone)})
+                    new Object[] { year, month, day,
+                    hour, minute, second,
+                    fractionalSecond, timezone})
                         );
-
-                        /**
-                String yearString = "null";
-                if (year != null) {
-                    yearString = year.toString();
-                }
-                String fractionalSecondString = "null";
-                if (fractionalSecond != null) {
-                    fractionalSecondString = fractionalSecond.toString();
-                }
-
-                throw new IllegalArgumentException(
-                    "year = " + yearString
-                    + ", month = " + month
-                    + ", day = " + day
-                    + ", hour = " + hour
-                    + ", minute = " + minute
-                    + ", second = " + second
-                    + ", fractionalSecond = " + fractionalSecondString
-                    + ", timezone = " + timezone
-                    + ", is not a valid representation of an XML Gregorian Calendar value."
-                );
-                */
-
         }
 
         save();
@@ -601,24 +577,10 @@
             throw new IllegalArgumentException(
                 DatatypeMessageFormatter.formatMessage(null,
                 "InvalidXGCValue-milli",
-                new Object[] { new Integer(year), new Integer(month), new Integer(day),
-                new Integer(hour), new Integer(minute), new Integer(second),
-                new Integer(millisecond), new Integer(timezone)})
+                new Object[] { year, month, day,
+                hour, minute, second,
+                millisecond, timezone})
                         );
-                /*
-                throw new IllegalArgumentException(
-                    "year = " + year
-                    + ", month = " + month
-                    + ", day = " + day
-                    + ", hour = " + hour
-                    + ", minute = " + minute
-                    + ", second = " + second
-                    + ", millisecond = " + millisecond
-                    + ", timezone = " + timezone
-                    + ", is not a valid representation of an XML Gregorian Calendar value."
-                    );
-                 */
-
         }
 
         save();
@@ -683,11 +645,11 @@
          */
     public XMLGregorianCalendarImpl(GregorianCalendar cal) {
 
-        int year = cal.get(Calendar.YEAR);
+        int year1 = cal.get(Calendar.YEAR);
         if (cal.get(Calendar.ERA) == GregorianCalendar.BC) {
-            year = -year;
+            year1 = -year1;
         }
-        this.setYear(year);
+        this.setYear(year1);
 
         // Calendar.MONTH is zero based, XSD Date datatype's month field starts
         // with JANUARY as 1.
@@ -1201,7 +1163,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setYear(BigInteger year) {
+    public final void setYear(BigInteger year) {
         if (year == null) {
             this.eon = null;
             this.year = DatatypeConstants.FIELD_UNDEFINED;
@@ -1225,7 +1187,7 @@
      * @param year value constraints are summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
      *   If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to <code>null</code>.
      */
-    public void setYear(int year) {
+    public final void setYear(int year) {
         if (year == DatatypeConstants.FIELD_UNDEFINED) {
             this.year = DatatypeConstants.FIELD_UNDEFINED;
             this.eon = null;
@@ -1269,7 +1231,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setMonth(int month) {
+    public final void setMonth(int month) {
         if(month<DatatypeConstants.JANUARY || DatatypeConstants.DECEMBER<month)
             if(month!=DatatypeConstants.FIELD_UNDEFINED)
                 invalidFieldValue(MONTH, month);
@@ -1287,7 +1249,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setDay(int day) {
+    public final void setDay(int day) {
         if(day<1 || 31<day)
             if(day!=DatatypeConstants.FIELD_UNDEFINED)
                 invalidFieldValue(DAY,day);
@@ -1306,7 +1268,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setTimezone(int offset) {
+    public final void setTimezone(int offset) {
             if(offset<-14*60 || 14*60<offset)
             if(offset!=DatatypeConstants.FIELD_UNDEFINED)
                 invalidFieldValue(TIMEZONE,offset);
@@ -1329,14 +1291,14 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setTime(int hour, int minute, int second) {
+    public final void setTime(int hour, int minute, int second) {
         setTime(hour, minute, second, null);
     }
 
     private void invalidFieldValue(int field, int value) {
         throw new IllegalArgumentException(
             DatatypeMessageFormatter.formatMessage(null, "InvalidFieldValue",
-                new Object[]{ new Integer(value), FIELD_NAME[field]})
+                new Object[]{ value, FIELD_NAME[field]})
         );
     }
 
@@ -1406,7 +1368,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setTime(
+    public final void setTime(
             int hour,
             int minute,
             int second,
@@ -1446,7 +1408,7 @@
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
-    public void setTime(int hour, int minute, int second, int millisecond) {
+    public final void setTime(int hour, int minute, int second, int millisecond) {
 
         setHour(hour, false);
 
@@ -1990,7 +1952,7 @@
      * Validate instance by <code>getXMLSchemaType()</code> constraints.
      * @return true if data values are valid.
      */
-    public boolean isValid() {
+    public final boolean isValid() {
         // since setters do not allow for invalid values,
         // (except for exceptional case of year field of zero),
         // no need to check for anything except for constraints
@@ -2091,7 +2053,8 @@
         BigInteger temp = BigInteger.valueOf((long) startMonth).add(dMonths);
         setMonth(temp.subtract(BigInteger.ONE).mod(TWELVE).intValue() + 1);
         BigInteger carry =
-                new BigDecimal(temp.subtract(BigInteger.ONE)).divide(new BigDecimal(TWELVE), BigDecimal.ROUND_FLOOR).toBigInteger();
+                new BigDecimal(temp.subtract(BigInteger.ONE))
+                        .divide(DECIMAL_TWELVE, RoundingMode.FLOOR).toBigInteger();
 
         /* Years (may be modified additionally below)
             *  E[year] := S[year] + D[year] + carry
@@ -2129,7 +2092,7 @@
         BigDecimal dSeconds = DurationImpl.sanitize((BigDecimal) duration.getField(DatatypeConstants.SECONDS), signum);
         BigDecimal tempBD = startSeconds.add(dSeconds);
         BigDecimal fQuotient =
-                new BigDecimal(new BigDecimal(tempBD.toBigInteger()).divide(DECIMAL_SIXTY, BigDecimal.ROUND_FLOOR).toBigInteger());
+                new BigDecimal(new BigDecimal(tempBD.toBigInteger()).divide(DECIMAL_SIXTY, RoundingMode.FLOOR).toBigInteger());
         BigDecimal endSeconds = tempBD.subtract(fQuotient.multiply(DECIMAL_SIXTY));
 
         carry = fQuotient.toBigInteger();
@@ -2161,7 +2124,7 @@
 
         temp = BigInteger.valueOf(startMinutes).add(dMinutes).add(carry);
         setMinute(temp.mod(SIXTY).intValue());
-        carry = new BigDecimal(temp).divide(DECIMAL_SIXTY, BigDecimal.ROUND_FLOOR).toBigInteger();
+        carry = new BigDecimal(temp).divide(DECIMAL_SIXTY, RoundingMode.FLOOR).toBigInteger();
 
         /* Hours
                *  temp := S[hour] + D[hour] + carry
@@ -2177,7 +2140,8 @@
 
         temp = BigInteger.valueOf(startHours).add(dHours).add(carry);
         setHour(temp.mod(TWENTY_FOUR).intValue(), false);
-        carry = new BigDecimal(temp).divide(new BigDecimal(TWENTY_FOUR), BigDecimal.ROUND_FLOOR).toBigInteger();
+        carry = new BigDecimal(temp).divide(DECIMAL_TWENTY_FOUR,
+                RoundingMode.FLOOR).toBigInteger();
 
         /* Days
            *  if S[day] > maximumDayInMonthFor(E[year], E[month])
@@ -2225,15 +2189,19 @@
                 // calculate days in previous month, watch for month roll over
                 BigInteger mdimf = null;
                 if (month >= 2) {
-                    mdimf = BigInteger.valueOf(maximumDayInMonthFor(getEonAndYear(), getMonth() - 1));
+                    mdimf = BigInteger.valueOf(maximumDayInMonthFor(getEonAndYear(),
+                            getMonth() - 1));
                 } else {
                     // roll over to December of previous year
-                    mdimf = BigInteger.valueOf(maximumDayInMonthFor(getEonAndYear().subtract(BigInteger.valueOf((long) 1)), 12));
+                    mdimf = BigInteger.valueOf(maximumDayInMonthFor(getEonAndYear()
+                            .subtract(BigInteger.ONE), 12));
                 }
                 endDays = endDays.add(mdimf);
                 monthCarry = -1;
-            } else if (endDays.compareTo(BigInteger.valueOf(maximumDayInMonthFor(getEonAndYear(), getMonth()))) > 0) {
-                endDays = endDays.add(BigInteger.valueOf(-maximumDayInMonthFor(getEonAndYear(), getMonth())));
+            } else if (endDays.compareTo(BigInteger.valueOf(
+                    maximumDayInMonthFor(getEonAndYear(), getMonth()))) > 0) {
+                endDays = endDays.add(BigInteger.valueOf(
+                        -maximumDayInMonthFor(getEonAndYear(), getMonth())));
                 monthCarry = 1;
             } else {
                 break;
@@ -2244,7 +2212,8 @@
             int quotient;
             if (endMonth < 0) {
                 endMonth = (13 - 1) + endMonth + 1;
-                quotient = BigDecimal.valueOf(intTemp - 1).divide(new BigDecimal(TWELVE), BigDecimal.ROUND_UP).intValue();
+                quotient = BigDecimal.valueOf(intTemp - 1)
+                        .divide(DECIMAL_TWELVE, RoundingMode.UP).intValue();
             } else {
                 quotient = (intTemp - 1) / (13 - 1);
                 endMonth += 1;
@@ -2292,6 +2261,8 @@
     private static final BigInteger TWELVE = BigInteger.valueOf(12);
     private static final BigDecimal DECIMAL_ZERO = BigDecimal.valueOf(0);
     private static final BigDecimal DECIMAL_ONE = BigDecimal.valueOf(1);
+    private static final BigDecimal DECIMAL_TWELVE = BigDecimal.valueOf(12);
+    private static final BigDecimal DECIMAL_TWENTY_FOUR = BigDecimal.valueOf(24);
     private static final BigDecimal DECIMAL_SIXTY = BigDecimal.valueOf(60);
 
 
@@ -2779,7 +2750,7 @@
         }
     }
 
-    public void setFractionalSecond(BigDecimal fractional) {
+    public final void setFractionalSecond(BigDecimal fractional) {
         if (fractional != null) {
             if ((fractional.compareTo(DECIMAL_ZERO) < 0) ||
                     (fractional.compareTo(DECIMAL_ONE) > 0)) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -790,7 +789,7 @@
                 // use specified document class
                 try {
                     Class documentClass = ObjectFactory.findProviderClass (fDocumentClassName, true);
-                    fDocument = (Document)documentClass.newInstance ();
+                    fDocument = (Document)documentClass.getConstructor().newInstance();
 
                     // if subclass of our own class that's cool too
                     Class defaultDocClass =
@@ -1750,7 +1749,9 @@
                 "xml:base",
                 "http://www.w3.org/XML/1998/namespace",
                 baseURI,
-                true);
+                true,
+                false,
+                null);
             }
         }
         else if (nodeType == Node.PROCESSING_INSTRUCTION_NODE) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -79,6 +78,7 @@
  * @author Andy Clark, IBM
  *
  */
+@SuppressWarnings("deprecation")
 public abstract class AbstractSAXParser
     extends AbstractXMLDocumentParser
     implements PSVIProvider, // PSVI
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AttributesProxy.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -34,6 +33,7 @@
  * @author Andy Clark, IBM
  *
  */
+@SuppressWarnings("deprecation")
 public final class AttributesProxy
     implements AttributeList, Attributes2 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -157,7 +156,7 @@
         // assert(className != null);
         try{
             Class providerClass = findProviderClass(className, cl, doFallback);
-            Object instance = providerClass.newInstance();
+            Object instance = providerClass.getConstructor().newInstance();
             debugPrintln(()->"created new instance of " + providerClass +
                              " using ClassLoader: " + cl);
             return instance;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -117,7 +116,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists();
                     }
                 })).booleanValue();
     }
@@ -126,7 +125,7 @@
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return f.lastModified();
                     }
                 })).longValue();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1702,7 +1702,7 @@
                 if (fEntityResolver != null) fChildConfig.setProperty(ENTITY_RESOLVER, fEntityResolver);
                 fChildConfig.setProperty(SECURITY_MANAGER, fSecurityManager);
                 fChildConfig.setProperty(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
-                fChildConfig.setProperty(BUFFER_SIZE, new Integer(fBufferSize));
+                fChildConfig.setProperty(BUFFER_SIZE, fBufferSize);
 
                 // features must be copied to child configuration
                 fNeedCopyFeatures = true;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -536,9 +535,9 @@
         private Tokens(SymbolTable symbolTable) {
             fSymbolTable = symbolTable;
 
-            fTokenNames.put(new Integer(XPTRTOKEN_ELEM_NCNAME),
+            fTokenNames.put(XPTRTOKEN_ELEM_NCNAME,
                     "XPTRTOKEN_ELEM_NCNAME");
-            fTokenNames.put(new Integer(XPTRTOKEN_ELEM_CHILD),
+            fTokenNames.put(XPTRTOKEN_ELEM_CHILD,
                     "XPTRTOKEN_ELEM_CHILD");
         }
 
@@ -548,7 +547,7 @@
          * @return String The token string
          */
         private String getTokenString(int token) {
-            return fTokenNames.get(new Integer(token));
+            return fTokenNames.get(token);
         }
 
         /**
@@ -560,7 +559,7 @@
             String str = fTokenNames.get(tokenStr);
             Integer tokenInt = str == null ? null : Integer.parseInt(str);
             if (tokenInt == null) {
-                tokenInt = new Integer(fTokenNames.size());
+                tokenInt = fTokenNames.size();
                 fTokenNames.put(tokenInt, tokenStr);
             }
             addToken(tokenInt.intValue());
@@ -763,7 +762,7 @@
                     // An invalid child sequence character
                     if (child == 0) {
                         reportError("InvalidChildSequenceCharacter",
-                                new Object[] { new Character((char) ch) });
+                                new Object[] { (char) ch });
                         return false;
                     }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ShortHandPointer.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/ShortHandPointer.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -227,7 +226,7 @@
 
             //
             if (typeDef != null && ((XSSimpleType) typeDef).isIDType()) {
-                return attrPSVI.getSchemaNormalizedValue();
+                return attrPSVI.getSchemaValue().getNormalizedValue();
             }
 
             // 4 & 5 NA
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -249,8 +248,8 @@
                 if (openParenCount != closeParenCount) {
                     reportError("UnbalancedParenthesisInXPointerExpression",
                             new Object[] { xpointer,
-                                    new Integer(openParenCount),
-                                    new Integer(closeParenCount) });
+                                    openParenCount,
+                                    closeParenCount });
                 }
 
                 // Perform scheme specific parsing of the pointer part
@@ -497,15 +496,15 @@
         private Tokens(SymbolTable symbolTable) {
             fSymbolTable = symbolTable;
 
-            fTokenNames.put(new Integer(XPTRTOKEN_OPEN_PAREN),
+            fTokenNames.put(XPTRTOKEN_OPEN_PAREN,
                     "XPTRTOKEN_OPEN_PAREN");
-            fTokenNames.put(new Integer(XPTRTOKEN_CLOSE_PAREN),
+            fTokenNames.put(XPTRTOKEN_CLOSE_PAREN,
                     "XPTRTOKEN_CLOSE_PAREN");
-            fTokenNames.put(new Integer(XPTRTOKEN_SHORTHAND),
+            fTokenNames.put(XPTRTOKEN_SHORTHAND,
                     "XPTRTOKEN_SHORTHAND");
-            fTokenNames.put(new Integer(XPTRTOKEN_SCHEMENAME),
+            fTokenNames.put(XPTRTOKEN_SCHEMENAME,
                     "XPTRTOKEN_SCHEMENAME");
-            fTokenNames.put(new Integer(XPTRTOKEN_SCHEMEDATA),
+            fTokenNames.put(XPTRTOKEN_SCHEMEDATA,
                     "XPTRTOKEN_SCHEMEDATA");
         }
 
@@ -515,7 +514,7 @@
          * @return String The token string
          */
         private String getTokenString(int token) {
-            return fTokenNames.get(new Integer(token));
+            return fTokenNames.get(token);
         }
 
         /**
@@ -527,7 +526,7 @@
             String str = fTokenNames.get(tokenStr);
             Integer tokenInt = str == null ? null : Integer.parseInt(str);
             if (tokenInt == null) {
-                tokenInt = new Integer(fTokenNames.size());
+                tokenInt = fTokenNames.size();
                 fTokenNames.put(tokenInt, tokenStr);
             }
             addToken(tokenInt.intValue());
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -113,7 +112,7 @@
                         Class xniStdConfigClass=ObjectFactory.findProviderClass(
                             "com.sun.org.apache.xerces.internal.parsers.StandardParserConfiguration",
                             true);
-                        fPullParserConfig=xniStdConfigClass.newInstance();
+                        fPullParserConfig=xniStdConfigClass.getConstructor().newInstance();
                         Object[] args2={fPullParserConfig};
                         fIncrementalParser = (SAXParser)ctor.newInstance(args2);
 
@@ -386,6 +385,7 @@
   /** Simple unit test. Attempt coroutine parsing of document indicated
    * by first argument (as a URI), report progress.
    */
+  @Deprecated
   public static void _main(String args[])
   {
     System.out.println("Starting...");
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -117,7 +116,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists();
                     }
                 })).booleanValue();
     }
@@ -126,7 +125,7 @@
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return f.lastModified();
                     }
                 })).longValue();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -205,7 +204,7 @@
     private static final int S_XALAN_PREFIX_LEN = S_XALAN_PREFIX.length();
 
     /** Synchronization object for lazy initialization of the above tables. */
-    private static Integer m_synch_object = new Integer(1);
+    private static final Object m_synch_object = new Object();
 
     /** the directory in which the various method property files are located */
     private static final String PROP_DIR = "com/sun/org/apache/xml/internal/serializer/";
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -125,7 +124,7 @@
 
         // _serializers.put(method, cls);
 
-        Object obj = cls.newInstance();
+        Object obj = cls.getConstructor().newInstance();
 
         if (obj instanceof SerializationHandler)
         {
@@ -151,7 +150,7 @@
                   className = SerializerConstants.DEFAULT_SAX_SERIALIZER;
                   cls = ObjectFactory.findProviderClass(className, true);
                   SerializationHandler sh =
-                      (SerializationHandler) cls.newInstance();
+                      (SerializationHandler) cls.getConstructor().newInstance();
                   sh.setContentHandler( (ContentHandler) obj);
                   sh.setOutputFormat(format);
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1170,7 +1170,7 @@
                         }
                     }
                     // Reference to invalid character which is returned
-                    refInvalidChar = new Character(ch);
+                    refInvalidChar = ch;
                     return false;
                 }
             }
@@ -1191,7 +1191,7 @@
                         }
                     }
                     // Reference to invalid character which is returned
-                    refInvalidChar = new Character(ch);
+                    refInvalidChar = ch;
                     return false;
                 }
             }
@@ -1233,7 +1233,7 @@
                         }
                     }
                     // Reference to invalid character which is returned
-                    refInvalidChar = new Character(ch);
+                    refInvalidChar = ch;
                     return refInvalidChar;
                 }
             }
@@ -1254,7 +1254,7 @@
                         }
                     }
                     // Reference to invalid character which is returned
-                    refInvalidChar = new Character(ch);
+                    refInvalidChar = ch;
                     return refInvalidChar;
                 }
             }
@@ -1296,7 +1296,7 @@
                     String msg =
                         Utils.messages.createMessage(
                             MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
-                            new Object[] { new Character(c)});
+                            new Object[] { c});
 
                     if (fErrorHandler != null) {
                         fErrorHandler.handleError(
@@ -1345,7 +1345,7 @@
                     String msg =
                         Utils.messages.createMessage(
                             MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT,
-                            new Object[] { new Character(c)});
+                            new Object[] { c});
 
                     if (fErrorHandler != null) {
                         fErrorHandler.handleError(
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -26,6 +25,7 @@
 import com.sun.org.apache.xml.internal.res.XMLErrorResources;
 import com.sun.org.apache.xml.internal.res.XMLMessages;
 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import java.lang.reflect.InvocationTargetException;
 
 
 /**
@@ -134,13 +134,14 @@
       // Create a new object if so.
       try
       {
-        return objectType.newInstance();
+        return objectType.getConstructor().newInstance();
       }
-      catch (InstantiationException ex){}
-      catch (IllegalAccessException ex){}
+      catch (InstantiationException | IllegalAccessException | SecurityException |
+              IllegalArgumentException | InvocationTargetException | NoSuchMethodException ex){}
 
       // Throw unchecked exception for error in pool configuration.
-      throw new RuntimeException(XMLMessages.createXMLMessage(XMLErrorResources.ER_EXCEPTION_CREATING_POOL, null)); //"exception creating new instance for pool");
+      throw new RuntimeException(XMLMessages.createXMLMessage(
+              XMLErrorResources.ER_EXCEPTION_CREATING_POOL, null));
     }
     else
     {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,6 +41,7 @@
  * in this class should allow easy garbage collection of source
  * trees (not yet!), and should centralize parsing for those source trees.
  */
+@SuppressWarnings("deprecation")
 public class SourceTreeManager
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -1295,11 +1294,11 @@
       m_DTMXRTreeFrags = new HashMap();
     }
 
-    if(m_DTMXRTreeFrags.containsKey(new Integer(dtmIdentity))){
-       return (DTMXRTreeFrag)m_DTMXRTreeFrags.get(new Integer(dtmIdentity));
+    if(m_DTMXRTreeFrags.containsKey(dtmIdentity)){
+       return (DTMXRTreeFrag)m_DTMXRTreeFrags.get(dtmIdentity);
     }else{
       final DTMXRTreeFrag frag = new DTMXRTreeFrag(dtmIdentity,this);
-      m_DTMXRTreeFrags.put(new Integer(dtmIdentity),frag);
+      m_DTMXRTreeFrags.put(dtmIdentity,frag);
       return frag ;
     }
   }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/HasPositionalPredChecker.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,6 +35,7 @@
 import com.sun.org.apache.xpath.internal.operations.Quo;
 import com.sun.org.apache.xpath.internal.operations.Variable;
 
+@SuppressWarnings("deprecation")
 public class HasPositionalPredChecker extends XPathVisitor
 {
         private boolean m_hasPositionalPred = false;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,12 +19,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-/*
- * $Id: FunctionTable.java,v 1.3 2005/09/28 13:49:34 pvedula Exp $
- */
+
 package com.sun.org.apache.xpath.internal.compiler;
 
 import com.sun.org.apache.xpath.internal.functions.Function;
+import java.lang.reflect.InvocationTargetException;
 import java.util.HashMap;
 import javax.xml.transform.TransformerException;
 
@@ -150,7 +149,7 @@
   private static Class m_functions[];
 
   /** Table of function name to function ID associations. */
-  private static HashMap m_functionID = new HashMap();
+  private static final HashMap<String, Integer> m_functionID = new HashMap<>();
 
   /**
    * The function table contains customized functions
@@ -160,7 +159,7 @@
   /**
    * Table of function name to function ID associations for customized functions
    */
-  private HashMap m_functionID_customer = new HashMap();
+  private HashMap<String, Integer> m_functionID_customer = new HashMap<>();
 
   /**
    * Number of built in functions.  Be sure to update this as
@@ -239,77 +238,77 @@
 
   static{
           m_functionID.put(Keywords.FUNC_CURRENT_STRING,
-                          new Integer(FunctionTable.FUNC_CURRENT));
+                          FunctionTable.FUNC_CURRENT);
           m_functionID.put(Keywords.FUNC_LAST_STRING,
-                          new Integer(FunctionTable.FUNC_LAST));
+                          FunctionTable.FUNC_LAST);
           m_functionID.put(Keywords.FUNC_POSITION_STRING,
-                          new Integer(FunctionTable.FUNC_POSITION));
+                          FunctionTable.FUNC_POSITION);
           m_functionID.put(Keywords.FUNC_COUNT_STRING,
-                          new Integer(FunctionTable.FUNC_COUNT));
+                          FunctionTable.FUNC_COUNT);
           m_functionID.put(Keywords.FUNC_ID_STRING,
-                          new Integer(FunctionTable.FUNC_ID));
+                          FunctionTable.FUNC_ID);
           m_functionID.put(Keywords.FUNC_KEY_STRING,
-                          new Integer(FunctionTable.FUNC_KEY));
+                          FunctionTable.FUNC_KEY);
           m_functionID.put(Keywords.FUNC_LOCAL_PART_STRING,
-                          new Integer(FunctionTable.FUNC_LOCAL_PART));
+                          FunctionTable.FUNC_LOCAL_PART);
           m_functionID.put(Keywords.FUNC_NAMESPACE_STRING,
-                          new Integer(FunctionTable.FUNC_NAMESPACE));
+                          FunctionTable.FUNC_NAMESPACE);
           m_functionID.put(Keywords.FUNC_NAME_STRING,
-                          new Integer(FunctionTable.FUNC_QNAME));
+                          FunctionTable.FUNC_QNAME);
           m_functionID.put(Keywords.FUNC_GENERATE_ID_STRING,
-                          new Integer(FunctionTable.FUNC_GENERATE_ID));
+                          FunctionTable.FUNC_GENERATE_ID);
           m_functionID.put(Keywords.FUNC_NOT_STRING,
-                          new Integer(FunctionTable.FUNC_NOT));
+                          FunctionTable.FUNC_NOT);
           m_functionID.put(Keywords.FUNC_TRUE_STRING,
-                          new Integer(FunctionTable.FUNC_TRUE));
+                          FunctionTable.FUNC_TRUE);
           m_functionID.put(Keywords.FUNC_FALSE_STRING,
-                          new Integer(FunctionTable.FUNC_FALSE));
+                          FunctionTable.FUNC_FALSE);
           m_functionID.put(Keywords.FUNC_BOOLEAN_STRING,
-                          new Integer(FunctionTable.FUNC_BOOLEAN));
+                          FunctionTable.FUNC_BOOLEAN);
           m_functionID.put(Keywords.FUNC_LANG_STRING,
-                          new Integer(FunctionTable.FUNC_LANG));
+                          FunctionTable.FUNC_LANG);
           m_functionID.put(Keywords.FUNC_NUMBER_STRING,
-                          new Integer(FunctionTable.FUNC_NUMBER));
+                          FunctionTable.FUNC_NUMBER);
           m_functionID.put(Keywords.FUNC_FLOOR_STRING,
-                          new Integer(FunctionTable.FUNC_FLOOR));
+                          FunctionTable.FUNC_FLOOR);
           m_functionID.put(Keywords.FUNC_CEILING_STRING,
-                          new Integer(FunctionTable.FUNC_CEILING));
+                          FunctionTable.FUNC_CEILING);
           m_functionID.put(Keywords.FUNC_ROUND_STRING,
-                          new Integer(FunctionTable.FUNC_ROUND));
+                          FunctionTable.FUNC_ROUND);
           m_functionID.put(Keywords.FUNC_SUM_STRING,
-                          new Integer(FunctionTable.FUNC_SUM));
+                          FunctionTable.FUNC_SUM);
           m_functionID.put(Keywords.FUNC_STRING_STRING,
-                          new Integer(FunctionTable.FUNC_STRING));
+                          FunctionTable.FUNC_STRING);
           m_functionID.put(Keywords.FUNC_STARTS_WITH_STRING,
-                          new Integer(FunctionTable.FUNC_STARTS_WITH));
+                          FunctionTable.FUNC_STARTS_WITH);
           m_functionID.put(Keywords.FUNC_CONTAINS_STRING,
-                          new Integer(FunctionTable.FUNC_CONTAINS));
+                          FunctionTable.FUNC_CONTAINS);
           m_functionID.put(Keywords.FUNC_SUBSTRING_BEFORE_STRING,
-                          new Integer(FunctionTable.FUNC_SUBSTRING_BEFORE));
+                          FunctionTable.FUNC_SUBSTRING_BEFORE);
           m_functionID.put(Keywords.FUNC_SUBSTRING_AFTER_STRING,
-                          new Integer(FunctionTable.FUNC_SUBSTRING_AFTER));
+                          FunctionTable.FUNC_SUBSTRING_AFTER);
           m_functionID.put(Keywords.FUNC_NORMALIZE_SPACE_STRING,
-                          new Integer(FunctionTable.FUNC_NORMALIZE_SPACE));
+                          FunctionTable.FUNC_NORMALIZE_SPACE);
           m_functionID.put(Keywords.FUNC_TRANSLATE_STRING,
-                          new Integer(FunctionTable.FUNC_TRANSLATE));
+                          FunctionTable.FUNC_TRANSLATE);
           m_functionID.put(Keywords.FUNC_CONCAT_STRING,
-                          new Integer(FunctionTable.FUNC_CONCAT));
+                          FunctionTable.FUNC_CONCAT);
           m_functionID.put(Keywords.FUNC_SYSTEM_PROPERTY_STRING,
-                          new Integer(FunctionTable.FUNC_SYSTEM_PROPERTY));
+                          FunctionTable.FUNC_SYSTEM_PROPERTY);
           m_functionID.put(Keywords.FUNC_EXT_FUNCTION_AVAILABLE_STRING,
-                        new Integer(FunctionTable.FUNC_EXT_FUNCTION_AVAILABLE));
+                        FunctionTable.FUNC_EXT_FUNCTION_AVAILABLE);
           m_functionID.put(Keywords.FUNC_EXT_ELEM_AVAILABLE_STRING,
-                          new Integer(FunctionTable.FUNC_EXT_ELEM_AVAILABLE));
+                          FunctionTable.FUNC_EXT_ELEM_AVAILABLE);
           m_functionID.put(Keywords.FUNC_SUBSTRING_STRING,
-                          new Integer(FunctionTable.FUNC_SUBSTRING));
+                          FunctionTable.FUNC_SUBSTRING);
           m_functionID.put(Keywords.FUNC_STRING_LENGTH_STRING,
-                          new Integer(FunctionTable.FUNC_STRING_LENGTH));
+                          FunctionTable.FUNC_STRING_LENGTH);
           m_functionID.put(Keywords.FUNC_UNPARSED_ENTITY_URI_STRING,
-                          new Integer(FunctionTable.FUNC_UNPARSED_ENTITY_URI));
+                          FunctionTable.FUNC_UNPARSED_ENTITY_URI);
           m_functionID.put(Keywords.FUNC_DOCLOCATION_STRING,
-                          new Integer(FunctionTable.FUNC_DOCLOCATION));
+                          FunctionTable.FUNC_DOCLOCATION);
           m_functionID.put(Keywords.FUNC_HERE_STRING,
-                          new Integer(FunctionTable.FUNC_HERE));
+                          FunctionTable.FUNC_HERE);
   }
 
   public FunctionTable(){
@@ -341,15 +340,14 @@
   {
           try{
               if (which < NUM_BUILT_IN_FUNCS) {
-                  return (Function) m_functions[which].newInstance();
+                  return (Function) m_functions[which].getConstructor().newInstance();
               } else {
                   Class<?> c =  m_functions_customer[which-NUM_BUILT_IN_FUNCS];
-                  return (Function) c.newInstance();
+                  return (Function) c.getConstructor().newInstance();
               }
-          }catch (IllegalAccessException ex){
-                  throw new TransformerException(ex.getMessage());
-          }catch (InstantiationException ex){
-                  throw new TransformerException(ex.getMessage());
+          }catch (InstantiationException | IllegalAccessException | SecurityException |
+              IllegalArgumentException | InvocationTargetException | NoSuchMethodException ex){
+              throw new TransformerException(ex.getMessage());
           }
   }
 
@@ -360,8 +358,8 @@
    * found in {@link com.sun.org.apache.xpath.internal.compiler.FunctionTable}, but may be a
    * value installed by an external module.
    */
-  Object getFunctionID(String key){
-          Object id = m_functionID_customer.get(key);
+  Integer getFunctionID(String key){
+          Integer id = m_functionID_customer.get(key);
           if (null == id) id = m_functionID.get(key);
           return id;
   }
@@ -376,7 +374,7 @@
   {
 
     int funcIndex;
-    Object funcIndexObj = getFunctionID(name);
+    Integer funcIndexObj = getFunctionID(name);
 
     if (func != null && !Function.class.isAssignableFrom(func)) {
         throw new ClassCastException(func.getName()
@@ -386,22 +384,19 @@
 
     if (null != funcIndexObj)
     {
-      funcIndex = ((Integer) funcIndexObj).intValue();
+      funcIndex = funcIndexObj;
 
       if (funcIndex < NUM_BUILT_IN_FUNCS){
               funcIndex = m_funcNextFreeIndex++;
-              m_functionID_customer.put(name, new Integer(funcIndex));
+              m_functionID_customer.put(name, funcIndex);
       }
       m_functions_customer[funcIndex - NUM_BUILT_IN_FUNCS] = func;
     }
     else
     {
             funcIndex = m_funcNextFreeIndex++;
-
             m_functions_customer[funcIndex-NUM_BUILT_IN_FUNCS] = func;
-
-            m_functionID_customer.put(name,
-                new Integer(funcIndex));
+            m_functionID_customer.put(name, funcIndex);
     }
     return funcIndex;
   }
@@ -415,11 +410,11 @@
    */
   public boolean functionAvailable(String methName)
   {
-      Object tblEntry = m_functionID.get(methName);
+      Integer tblEntry = m_functionID.get(methName);
       if (null != tblEntry) return true;
       else{
               tblEntry = m_functionID_customer.get(methName);
-              return (null != tblEntry)? true : false;
+              return (null != tblEntry);
       }
   }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/XPathParser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -667,8 +666,7 @@
   {
 
     int tok;
-
-    Object id;
+    Integer id;
 
     try
     {
@@ -676,7 +674,7 @@
       // a FilterExpr.
       id = Keywords.lookupNodeTest(key);
       if (null == id) id = m_functionTable.getFunctionID(key);
-      tok = ((Integer) id).intValue();
+      tok = id;
     }
     catch (NullPointerException npe)
     {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -170,7 +169,7 @@
             if (name == null) {
                 String fmsg = XSLMessages.createXPATHMessage(
                         XPATHErrorResources.ER_FEATURE_NAME_NULL,
-                        new Object[] { CLASS_NAME, new Boolean( value) } );
+                        new Object[] { CLASS_NAME,  value } );
                 throw new NullPointerException( fmsg );
              }
 
@@ -179,7 +178,7 @@
                 if ((_isSecureMode) && (!value)) {
                     String fmsg = XSLMessages.createXPATHMessage(
                             XPATHErrorResources.ER_SECUREPROCESSING_FEATURE,
-                            new Object[] { name, CLASS_NAME, new Boolean(value) } );
+                            new Object[] { name, CLASS_NAME, value } );
                     throw new XPathFactoryConfigurationException( fmsg );
                 }
 
@@ -207,7 +206,7 @@
             // unknown feature
             String fmsg = XSLMessages.createXPATHMessage(
                     XPATHErrorResources.ER_FEATURE_UNKNOWN,
-                    new Object[] { name, CLASS_NAME, new Boolean(value) } );
+                    new Object[] { name, CLASS_NAME, value } );
             throw new XPathFactoryConfigurationException( fmsg );
         }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XBoolean.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -134,7 +133,7 @@
   public Object object()
   {
     if(null == m_obj)
-      setObject(new Boolean(m_val));
+      setObject(m_val);
     return m_obj;
   }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNumber.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -378,7 +377,7 @@
   public Object object()
   {
     if(null == m_obj)
-      setObject(new Double(m_val));
+      setObject(m_val);
     return m_obj;
   }
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -499,13 +498,13 @@
       result = str();
       break;
     case CLASS_NUMBER :
-      result = new Double(num());
+      result = num();
       break;
     case CLASS_NODESET :
       result = iter();
       break;
     case CLASS_BOOLEAN :
-      result = new Boolean(bool());
+      result = bool();
       break;
     case CLASS_UNKNOWN :
       result = m_obj;
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/FactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/FactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -190,7 +190,7 @@
             if (!type.isAssignableFrom(providerClass)) {
                 throw new ClassCastException(className + " cannot be cast to " + type.getName());
             }
-            Object instance = providerClass.newInstance();
+            Object instance = providerClass.getConstructor().newInstance();
             final ClassLoader clD = cl;
             dPrint(()->"created new instance of " + providerClass +
                        " using ClassLoader: " + clD);
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists();
                 }
             })).booleanValue();
     }
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/FactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -190,7 +190,7 @@
             if (!type.isAssignableFrom(providerClass)) {
                 throw new ClassCastException(className + " cannot be cast to " + type.getName());
             }
-            Object instance = providerClass.newInstance();
+            Object instance = providerClass.getConstructor().newInstance();
             final ClassLoader clD = cl;
             dPrint(()->"created new instance of " + providerClass +
                        " using ClassLoader: " + clD);
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParser.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParser.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,7 @@
  * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @since 1.4
  */
+@SuppressWarnings("deprecation")
 public abstract class SAXParser {
 
     /**
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists();
                 }
             })).booleanValue();
     }
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/FactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -191,7 +191,7 @@
             if (!type.isAssignableFrom(providerClass)) {
                 throw new ClassCastException(className + " cannot be cast to " + type.getName());
             }
-            Object instance = providerClass.newInstance();
+            Object instance = providerClass.getConstructor().newInstance();
             final ClassLoader clD = cl;
             dPrint(()->"created new instance of " + providerClass +
                        " using ClassLoader: " + clD);
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -176,7 +176,7 @@
                 instance = newInstanceNoServiceLoader(type, providerClass);
             }
             if (instance == null) {
-                instance = providerClass.newInstance();
+                instance = providerClass.getConstructor().newInstance();
             }
             final ClassLoader clD = cl;
             dPrint(()->"created new instance of " + providerClass +
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists();
                 }
             })).booleanValue();
     }
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package javax.xml.validation;
 
 import java.io.File;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.security.AccessControlContext;
@@ -286,41 +287,31 @@
         // get Class from className
         Class<?> clazz = createClass(className);
         if (clazz == null) {
-                debugPrintln(()->"failed to getClass(" + className + ")");
-                return null;
+            debugPrintln(()->"failed to getClass(" + className + ")");
+            return null;
         }
         debugPrintln(()->"loaded " + className + " from " + which(clazz));
 
         // instantiate Class as a SchemaFactory
         try {
-                if (!SchemaFactory.class.isAssignableFrom(clazz)) {
-                    throw new ClassCastException(clazz.getName()
-                                + " cannot be cast to " + SchemaFactory.class);
-                }
-                if (!useServicesMechanism) {
-                    schemaFactory = newInstanceNoServiceLoader(clazz);
-                }
-                if (schemaFactory == null) {
-                    schemaFactory = (SchemaFactory) clazz.newInstance();
-                }
-        } catch (ClassCastException classCastException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        classCastException.printStackTrace();
-                }
-                return null;
-        } catch (IllegalAccessException illegalAccessException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        illegalAccessException.printStackTrace();
-                }
-                return null;
-        } catch (InstantiationException instantiationException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        instantiationException.printStackTrace();
-                }
-                return null;
+            if (!SchemaFactory.class.isAssignableFrom(clazz)) {
+                throw new ClassCastException(clazz.getName()
+                            + " cannot be cast to " + SchemaFactory.class);
+            }
+            if (!useServicesMechanism) {
+                schemaFactory = newInstanceNoServiceLoader(clazz);
+            }
+            if (schemaFactory == null) {
+                schemaFactory = (SchemaFactory) clazz.getConstructor().newInstance();
+            }
+        } catch (ClassCastException | IllegalAccessException | IllegalArgumentException |
+            InstantiationException | InvocationTargetException | NoSuchMethodException |
+            SecurityException ex) {
+            debugPrintln(()->"could not instantiate " + clazz.getName());
+            if (debug) {
+                    ex.printStackTrace();
+            }
+            return null;
         }
 
         return schemaFactory;
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java	Mon Jul 10 10:22:36 2017 -0700
@@ -26,6 +26,7 @@
 package javax.xml.xpath;
 
 import java.io.File;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.security.AccessControlContext;
@@ -297,26 +298,16 @@
                 xPathFactory = newInstanceNoServiceLoader(clazz);
             }
             if (xPathFactory == null) {
-                xPathFactory = (XPathFactory) clazz.newInstance();
+                xPathFactory = (XPathFactory) clazz.getConstructor().newInstance();
             }
-        } catch (ClassCastException classCastException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        classCastException.printStackTrace();
-                }
-                return null;
-        } catch (IllegalAccessException illegalAccessException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        illegalAccessException.printStackTrace();
-                }
-                return null;
-        } catch (InstantiationException instantiationException) {
-                debugPrintln(()->"could not instantiate " + clazz.getName());
-                if (debug) {
-                        instantiationException.printStackTrace();
-                }
-                return null;
+        } catch (ClassCastException | IllegalAccessException | IllegalArgumentException |
+            InstantiationException | InvocationTargetException | NoSuchMethodException |
+            SecurityException ex) {
+            debugPrintln(()->"could not instantiate " + clazz.getName());
+            if (debug) {
+                    ex.printStackTrace();
+            }
+            return null;
         }
 
         return xPathFactory;
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/DOMImplementationRegistry.java	Mon Jul 10 10:22:36 2017 -0700
@@ -50,6 +50,7 @@
 import java.io.InputStream;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
@@ -183,9 +184,13 @@
                 } else {
                     sourceClass = Class.forName(sourceName);
                 }
-                DOMImplementationSource source =
-                    (DOMImplementationSource) sourceClass.newInstance();
-                sources.addElement(source);
+                try {
+                    DOMImplementationSource source =
+                        (DOMImplementationSource) sourceClass.getConstructor().newInstance();
+                    sources.addElement(source);
+                } catch (NoSuchMethodException | InvocationTargetException e) {
+                    throw new InstantiationException(e.getMessage());
+                }
             }
         }
         return new DOMImplementationRegistry(sources);
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/NewInstance.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/NewInstance.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 
 package org.xml.sax.helpers;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.Objects;
 
 /**
@@ -90,7 +91,11 @@
             driverClass = classLoader.loadClass(className);
         }
 
-        return type.cast(driverClass.newInstance());
+        try {
+            return type.cast(driverClass.getConstructor().newInstance());
+        } catch (NoSuchMethodException | SecurityException | InvocationTargetException ex) {
+            throw new InstantiationException(ex.getMessage());
+        }
     }
 
 }
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,6 +79,7 @@
  * @see org.xml.sax.XMLReader
  * @see org.xml.sax.Parser
  */
+@SuppressWarnings("deprecation")
 public class ParserAdapter implements XMLReader, DocumentHandler
 {
     private static SecuritySupport ss = new SecuritySupport();
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/SecuritySupport.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/SecuritySupport.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@
 
     boolean doesFileExist(final File f) {
         return (AccessController.doPrivileged((PrivilegedAction<Boolean>)() ->
-                new Boolean(f.exists())));
+                f.exists()));
     }
 
 }
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java	Fri Jul 07 03:13:49 2017 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java	Mon Jul 10 10:22:36 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,7 @@
  * @see org.xml.sax.Parser
  * @see org.xml.sax.XMLReader
  */
+@SuppressWarnings("deprecation")
 public class XMLReaderAdapter implements Parser, ContentHandler
 {