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

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new e77a2d1277 Unit tests
e77a2d1277 is described below

commit e77a2d1277f2ca0c40eb5086ea555fccbb20a7ff
Author: James Bognar <[email protected]>
AuthorDate: Tue Dec 2 06:15:58 2025 -0800

    Unit tests
---
 .../src/main/java/org/apache/juneau/commons/utils/StringUtils.java   | 3 ---
 .../test/java/org/apache/juneau/commons/utils/StringUtils_Test.java  | 5 ++++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
index 6d7c9d0357..33d487d3ac 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
@@ -7458,9 +7458,6 @@ public class StringUtils {
                                        var c2 = s.charAt(i + 1);
                                        if (escaped.contains(c2)) {
                                                i++;  // NOSONAR - Intentional.
-                                       } else if (c2 == '\\') {
-                                               sb.append('\\');
-                                               i++;  // NOSONAR - Intentional.
                                        }
                                }
                        }
diff --git 
a/juneau-utest/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
 
b/juneau-utest/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
index 4481427da9..e165576164 100755
--- 
a/juneau-utest/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
+++ 
b/juneau-utest/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
@@ -6563,7 +6563,10 @@ class StringUtils_Test extends TestBase {
                // - First '\' sees second '\', appends '\' and skips second '\'
                // - Then appends the second '\' from the string, then 'b'
                // Result: "a\\\\b" (both backslashes preserved)
-               assertEquals("a\\\\b", unescapeChars("a\\\\b", 
AsciiSet.of(","))); // '\' not in escaped set
+               System.out.println("=== Testing unescapeChars with a\\\\b, 
backslash NOT in escaped set ===");
+               var result2 = unescapeChars("a\\\\b", AsciiSet.of(","));
+               System.out.println("Result: " + 
java.util.Arrays.toString(result2.toCharArray()));
+               assertEquals("a\\\\b", result2); // '\' not in escaped set
        }
 
        
//====================================================================================================

Reply via email to