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 d3e95cefb Use Character.valueOf instead of deprecated Character 
constructor (#29)
d3e95cefb is described below

commit d3e95cefb983f9ace3a3d6848bd602b0b233cb17
Author: Samael <[email protected]>
AuthorDate: Mon Jul 21 12:01:20 2025 +0100

    Use Character.valueOf instead of deprecated Character constructor (#29)
---
 src/org/apache/xerces/xpointer/ElementSchemePointer.java | 2 +-
 src/org/apache/xml/serialize/EncodingInfo.java           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/org/apache/xerces/xpointer/ElementSchemePointer.java 
b/src/org/apache/xerces/xpointer/ElementSchemePointer.java
index 45ad17dda..30fa5f07c 100644
--- a/src/org/apache/xerces/xpointer/ElementSchemePointer.java
+++ b/src/org/apache/xerces/xpointer/ElementSchemePointer.java
@@ -770,7 +770,7 @@ final class ElementSchemePointer implements XPointerPart {
                     // An invalid child sequence character
                     if (child == 0) {
                         reportError("InvalidChildSequenceCharacter",
-                                new Object[] { new Character((char) ch) });
+                                new Object[] { Character.valueOf((char) ch) });
                         return false;
                     }
 
diff --git a/src/org/apache/xml/serialize/EncodingInfo.java 
b/src/org/apache/xml/serialize/EncodingInfo.java
index 9d423a00e..aab15b1b8 100644
--- a/src/org/apache/xml/serialize/EncodingInfo.java
+++ b/src/org/apache/xml/serialize/EncodingInfo.java
@@ -140,7 +140,7 @@ public class EncodingInfo {
         // Attempt to use the CharsetEncoder to determine whether the 
character is printable.
         if (fCharsetEncoder != null) {
             try {
-                fArgsForMethod[0] = new Character(ch);
+                fArgsForMethod[0] = Character.valueOf(ch);
                 return ((Boolean) 
CharsetMethods.fgCharsetEncoderCanEncodeMethod.invoke(fCharsetEncoder, 
fArgsForMethod)).booleanValue();
             } 
             catch (Exception e) {
@@ -173,7 +173,7 @@ public class EncodingInfo {
             }
         }
         try {
-            fArgsForMethod[0] = new Character(ch);
+            fArgsForMethod[0] = Character.valueOf(ch);
             return ((Boolean) 
CharToByteConverterMethods.fgCanConvertMethod.invoke(fCharToByteConverter, 
fArgsForMethod)).booleanValue();
         } 
         catch (Exception e) {


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

Reply via email to