JAXB modules are using to be deleted Java APIs (#1463)

* https://github.com/eclipse-ee4j/jaxb-ri/issues/1461

Signed-off-by: Steve Davidson <steve@j2eeguys.com>

Co-authored-by: Sanddust <sanddust@j2eeguys.com>
Co-authored-by: Honor Systems Updater Jenkins <hsujenkins@j2eeguys.com>
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
index d8c0ff9..8c90db3 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -251,7 +251,7 @@
     public void onEnterElementConsumed(
             String uri, String localName, String qname,Attributes atts) throws SAXException {
         attStack.push(currentAtts=new AttributesImpl(atts));
-        nsEffectiveStack.push( new Integer(nsEffectivePtr) );
+        nsEffectiveStack.push( Integer.valueOf(nsEffectivePtr) );
         nsEffectivePtr = namespaces.size();
     }
 
@@ -509,8 +509,8 @@
                 "Unexpected {0} appears at line {1} column {2}",
                 new Object[]{
                         token,
-                        new Integer(getLocator().getLineNumber()),
-                        new Integer(getLocator().getColumnNumber()) }),
+                        Integer.valueOf(getLocator().getLineNumber()),
+                        Integer.valueOf(getLocator().getColumnNumber()) }),
                 getLocator());
     }
 
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
index 299aae0..940f9ac 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
@@ -40,7 +40,7 @@
 import javax.lang.model.type.WildcardType;
 import javax.lang.model.util.ElementFilter;
 import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor8;
 import javax.lang.model.util.Types;
 
 /**
@@ -448,7 +448,7 @@
     /**
      * Implements {@link #getBaseClass}.
      */
-    private final SimpleTypeVisitor6<TypeMirror, TypeElement> baseClassFinder = new SimpleTypeVisitor6<TypeMirror, TypeElement>() {
+    private final SimpleTypeVisitor8<TypeMirror, TypeElement> baseClassFinder = new SimpleTypeVisitor8<TypeMirror, TypeElement>() {
         @Override
         public TypeMirror visitDeclared(DeclaredType t, TypeElement sup) {
             if (t.asElement().equals(sup))
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java
index 58f8e5e..91fdff1 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/bindinfo/BindInfo.java
@@ -142,7 +142,7 @@
 
         String v = DOMUtil.getAttribute(serial,"uid");
         if(v==null) v="1";
-        return new Long(v);
+        return Long.valueOf(v);
     }
     
     /** Gets the xjc:superClass customization if it's turned on. */
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java
index 9cc9b2e..e117a84 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/NGCCRuntime.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -252,7 +252,7 @@
     public void onEnterElementConsumed(
             String uri, String localName, String qname,Attributes atts) throws SAXException {
         attStack.push(currentAtts=new AttributesImpl(atts));
-        nsEffectiveStack.push( new Integer(nsEffectivePtr) );
+        nsEffectiveStack.push( Integer.valueOf(nsEffectivePtr) );
         nsEffectivePtr = namespaces.size();
     }
 
@@ -510,8 +510,8 @@
                 "Unexpected {0} appears at line {1} column {2}",
                 new Object[]{
                         token,
-                        new Integer(getLocator().getLineNumber()),
-                        new Integer(getLocator().getColumnNumber()) }),
+                        Integer.valueOf(getLocator().getLineNumber()),
+                        Integer.valueOf(getLocator().getColumnNumber()) }),
                 getLocator());
     }
 
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java
index 9704452..5fbaf82 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/elementDeclBody.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -1109,9 +1109,9 @@
 
       private ElementDecl makeResult() {
         if(finalValue==null)
-          finalValue = new Integer($runtime.finalDefault);
+          finalValue = Integer.valueOf($runtime.finalDefault);
         if(blockValue==null)
-          blockValue = new Integer($runtime.blockDefault);
+          blockValue = Integer.valueOf($runtime.blockDefault);
 
         if(!formSpecified)
           form = $runtime.elementFormDefault;
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java
index 77071eb..9dc46a0 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/erSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -153,17 +153,17 @@
 
     
       private Integer makeResult() {
-        if(v==null)     return new Integer($runtime.finalDefault);
+        if(v==null)     return Integer.valueOf($runtime.finalDefault);
         
         if(v.indexOf("#all")!=-1)
-            return new Integer(XSType.EXTENSION|XSType.RESTRICTION);
+            return Integer.valueOf(XSType.EXTENSION|XSType.RESTRICTION);
         
         int r = 0;
         
         if(v.indexOf("extension")!=-1)      r|=XSType.EXTENSION;
         if(v.indexOf("restriction")!=-1)    r|=XSType.RESTRICTION;
         
-        return new Integer(r);
+        return Integer.valueOf(r);
       }
     
 }
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java
index 7d7230a..4b91853 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/ersSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -153,11 +153,10 @@
 
     
       private Integer makeResult() {
-        if(v==null)     return new Integer($runtime.blockDefault);
+        if(v==null)     return Integer.valueOf($runtime.blockDefault);
         
         if(v.indexOf("#all")!=-1)
-            return new Integer(
-              XSType.EXTENSION|XSType.RESTRICTION|XSType.SUBSTITUTION);
+            return Integer.valueOf(XSType.EXTENSION|XSType.RESTRICTION|XSType.SUBSTITUTION);
         
         int r = 0;
         
@@ -165,7 +164,7 @@
         if(v.indexOf("restriction")!=-1)    r|=XSType.RESTRICTION;
         if(v.indexOf("substitution")!=-1)   r|=XSType.SUBSTITUTION;
         
-        return new Integer(r);
+        return Integer.valueOf(r);
       }
     
 }
diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java
index a87e2f3..5cea81d 100644
--- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java
+++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/impl/parser/state/qualification.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -57,7 +57,7 @@
         switch($_ngcc_current_state) {
         case 0:
             {
-                revertToParentFromEnterElement(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname, $attrs);
+                revertToParentFromEnterElement(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname, $attrs);
             }
             break;
         default:
@@ -76,7 +76,7 @@
         switch($_ngcc_current_state) {
         case 0:
             {
-                revertToParentFromLeaveElement(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+                revertToParentFromLeaveElement(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
             }
             break;
         default:
@@ -95,7 +95,7 @@
         switch($_ngcc_current_state) {
         case 0:
             {
-                revertToParentFromEnterAttribute(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+                revertToParentFromEnterAttribute(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
             }
             break;
         default:
@@ -114,7 +114,7 @@
         switch($_ngcc_current_state) {
         case 0:
             {
-                revertToParentFromLeaveAttribute(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
+                revertToParentFromLeaveAttribute(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
             }
             break;
         default:
@@ -130,7 +130,7 @@
         switch($_ngcc_current_state) {
         case 0:
             {
-                revertToParentFromText(new Boolean(text.trim().equals("qualified")), super._cookie, $value);
+                revertToParentFromText(Boolean.valueOf(text.trim().equals("qualified")), super._cookie, $value);
             }
             break;
         case 1: