This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new c2a7e5b00 Add NumericEntityUnescaperTest.testOutOfRangeCodePoint()
c2a7e5b00 is described below
commit c2a7e5b005d19932df37486efd598f0a99331b7e
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jun 2 07:27:29 2026 -0400
Add NumericEntityUnescaperTest.testOutOfRangeCodePoint()
---
.../commons/lang3/text/translate/NumericEntityUnescaperTest.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
b/src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
index 52a5cf76d..bcf8b4fbe 100644
---
a/src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
+++
b/src/test/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaperTest.java
@@ -39,6 +39,14 @@ void testOutOfBounds() {
assertEquals("Test &#X", neu.translate("Test &#X"), "Failed to ignore
when last character is &");
}
+ @Test
+ void testOutOfRangeCodePoint() {
+ final NumericEntityUnescaper neu = new NumericEntityUnescaper();
+ assertEquals("�", neu.translate("�"), "Failed to
ignore code point above 0x10FFFF");
+ assertEquals("�", neu.translate("�"), "Failed to
ignore code point above 0x10FFFF");
+ assertEquals("�", neu.translate("�"), "Failed to
ignore code point above 0x10FFFF");
+ }
+
@Test
void testSupplementaryUnescaping() {
final NumericEntityUnescaper neu = new NumericEntityUnescaper();