This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/xerces-j.git


The following commit(s) were added to refs/heads/main by this push:
     new 8bdc403c2 [NOJIRA]: Use valueOf instead of deprecated constructors 
(#46)
8bdc403c2 is described below

commit 8bdc403c27fe4058fb3265ac5b997c94db69c60e
Author: Samael <[email protected]>
AuthorDate: Mon Nov 10 00:21:37 2025 +0000

    [NOJIRA]: Use valueOf instead of deprecated constructors (#46)
---
 src/org/apache/html/dom/SecuritySupport.java                     | 2 +-
 src/org/apache/xerces/dom/SecuritySupport.java                   | 2 +-
 src/org/apache/xerces/impl/dv/SecuritySupport.java               | 2 +-
 src/org/apache/xerces/impl/dv/util/ByteListImpl.java             | 2 +-
 src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java | 2 +-
 src/org/apache/xerces/impl/xs/util/ShortListImpl.java            | 2 +-
 src/org/apache/xerces/parsers/SecuritySupport.java               | 2 +-
 src/org/apache/xerces/xinclude/SecuritySupport.java              | 2 +-
 src/org/apache/xml/serialize/SecuritySupport.java                | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/org/apache/html/dom/SecuritySupport.java 
b/src/org/apache/html/dom/SecuritySupport.java
index 07bdfcede..0db0e8bf6 100644
--- a/src/org/apache/html/dom/SecuritySupport.java
+++ b/src/org/apache/html/dom/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }
diff --git a/src/org/apache/xerces/dom/SecuritySupport.java 
b/src/org/apache/xerces/dom/SecuritySupport.java
index 43a49ad10..4ce11a582 100644
--- a/src/org/apache/xerces/dom/SecuritySupport.java
+++ b/src/org/apache/xerces/dom/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }
diff --git a/src/org/apache/xerces/impl/dv/SecuritySupport.java 
b/src/org/apache/xerces/impl/dv/SecuritySupport.java
index 4b98ea754..9d5ad0ff5 100644
--- a/src/org/apache/xerces/impl/dv/SecuritySupport.java
+++ b/src/org/apache/xerces/impl/dv/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }
diff --git a/src/org/apache/xerces/impl/dv/util/ByteListImpl.java 
b/src/org/apache/xerces/impl/dv/util/ByteListImpl.java
index f714d7f46..c5237bd80 100644
--- a/src/org/apache/xerces/impl/dv/util/ByteListImpl.java
+++ b/src/org/apache/xerces/impl/dv/util/ByteListImpl.java
@@ -93,7 +93,7 @@ public class ByteListImpl extends AbstractList implements 
ByteList {
 
     public Object get(int index) {
         if (index >= 0 && index < data.length) {
-            return new Byte(data[index]);
+            return Byte.valueOf(data[index]);
         }
         throw new IndexOutOfBoundsException("Index: " + index);
     }
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java 
b/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
index 3149aeca6..3bcd10a56 100644
--- a/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
+++ b/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
@@ -1160,7 +1160,7 @@ public class XSAttributeChecker {
             }
         }
 
-        attrValues[ATTIDX_FROMDEFAULT] = new Long(fromDefault);
+        attrValues[ATTIDX_FROMDEFAULT] = Long.valueOf(fromDefault);
         //attrValues[ATTIDX_OTHERVALUES] = otherValues;
 
         // Check that minOccurs isn't greater than maxOccurs.
diff --git a/src/org/apache/xerces/impl/xs/util/ShortListImpl.java 
b/src/org/apache/xerces/impl/xs/util/ShortListImpl.java
index 21581086b..ae3191e13 100644
--- a/src/org/apache/xerces/impl/xs/util/ShortListImpl.java
+++ b/src/org/apache/xerces/impl/xs/util/ShortListImpl.java
@@ -109,7 +109,7 @@ public final class ShortListImpl extends AbstractList 
implements ShortList {
 
     public Object get(int index) {
         if (index >= 0 && index < fLength) {
-            return new Short(fArray[index]);
+            return Short.valueOf(fArray[index]);
         }
         throw new IndexOutOfBoundsException("Index: " + index);
     }
diff --git a/src/org/apache/xerces/parsers/SecuritySupport.java 
b/src/org/apache/xerces/parsers/SecuritySupport.java
index 87a8d8726..52e44b4da 100644
--- a/src/org/apache/xerces/parsers/SecuritySupport.java
+++ b/src/org/apache/xerces/parsers/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }
diff --git a/src/org/apache/xerces/xinclude/SecuritySupport.java 
b/src/org/apache/xerces/xinclude/SecuritySupport.java
index 3f7667839..0b6517da2 100644
--- a/src/org/apache/xerces/xinclude/SecuritySupport.java
+++ b/src/org/apache/xerces/xinclude/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }
diff --git a/src/org/apache/xml/serialize/SecuritySupport.java 
b/src/org/apache/xml/serialize/SecuritySupport.java
index d2e13f7f1..715674be8 100644
--- a/src/org/apache/xml/serialize/SecuritySupport.java
+++ b/src/org/apache/xml/serialize/SecuritySupport.java
@@ -132,7 +132,7 @@ final class SecuritySupport {
         return ((Long)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Long(f.lastModified());
+                        return Long.valueOf(f.lastModified());
                     }
                 })).longValue();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to