This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new c1ea140831 Revert "Simplify constructing chars"
c1ea140831 is described below
commit c1ea1408310d0ff614ea3108f9a6f1d5d9189af0
Author: Daniel Sun <[email protected]>
AuthorDate: Wed Jan 15 00:49:19 2025 +0900
Revert "Simplify constructing chars"
This reverts commit 3650540f5230e6ab645d18d1305f9da006057a8f.
---
src/main/java/org/apache/groovy/parser/antlr4/util/StringUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/groovy/parser/antlr4/util/StringUtils.java
b/src/main/java/org/apache/groovy/parser/antlr4/util/StringUtils.java
index fac53d2edc..d4fc339e1c 100644
--- a/src/main/java/org/apache/groovy/parser/antlr4/util/StringUtils.java
+++ b/src/main/java/org/apache/groovy/parser/antlr4/util/StringUtils.java
@@ -47,7 +47,7 @@ public class StringUtils {
return _0;
}
- return _1 + ((char) Integer.parseInt(_2, 16));
+ return _1 + new
String(Character.toChars(Integer.parseInt(_2, 16)));
}
});
}
@@ -63,7 +63,7 @@ public class StringUtils {
return _0;
}
- return _1 + ((char) Integer.parseInt(_2, 8));
+ return _1 + new
String(Character.toChars(Integer.parseInt(_2, 8)));
}
});
}
@@ -251,4 +251,4 @@ public class StringUtils {
* Represents a failed index search.
*/
private static final int INDEX_NOT_FOUND = -1;
-}
+}
\ No newline at end of file