This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new b5014b1b52 Re-generate code. No functional change.
b5014b1b52 is described below
commit b5014b1b521f8dc1ed6b12f2e0199c79228b512f
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Sep 16 11:30:11 2026 +0100
Re-generate code. No functional change.
Updated to latest JavaCC. Generated code updated so diff for upcoming
functional change is clearer.
---
java/org/apache/tomcat/util/json/JSONFilter.java | 3 +--
java/org/apache/tomcat/util/json/JSONParser.java | 21 +++++++++------------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/java/org/apache/tomcat/util/json/JSONFilter.java
b/java/org/apache/tomcat/util/json/JSONFilter.java
index 14f8e85f0e..4125fcc8cd 100644
--- a/java/org/apache/tomcat/util/json/JSONFilter.java
+++ b/java/org/apache/tomcat/util/json/JSONFilter.java
@@ -103,8 +103,7 @@ public class JSONFilter {
int v = c;
escaped.append("\\u").append(Character.forDigit((v >>> 12)
& 0xF, 16))
.append(Character.forDigit((v >>> 8) & 0xF, 16))
- .append(Character.forDigit((v >>> 4) & 0xF, 16))
- .append(Character.forDigit(v & 0xF, 16));
+ .append(Character.forDigit((v >>> 4) & 0xF,
16)).append(Character.forDigit(v & 0xF, 16));
}
}
}
diff --git a/java/org/apache/tomcat/util/json/JSONParser.java
b/java/org/apache/tomcat/util/json/JSONParser.java
index 36f497e3b5..083f323848 100644
--- a/java/org/apache/tomcat/util/json/JSONParser.java
+++ b/java/org/apache/tomcat/util/json/JSONParser.java
@@ -57,7 +57,7 @@ public class JSONParser implements JSONParserConstants {
}
/**
- * Parses any JSON-parseable object, returning the value.
+ * Parses any JSON-parsable object, returning the value.
*/
public Object parse() throws ParseException {
Object toReturn = anything();
@@ -76,11 +76,9 @@ public class JSONParser implements JSONParserConstants {
}
/**
- * Resolve the JSON escape sequences of a string token body (the
- * surrounding quotes are already removed). The token grammar only
- * admits the short escapes: {@code \b}, {@code \f}, {@code \n},
- * {@code \r}, {@code \t}, {@code \/}, {@code \\} and the
- * self-escaped quote character.
+ * Resolve the JSON escape sequences of a string token body (the
surrounding quotes are already removed). The token
+ * grammar only admits the short escapes: {@code \b}, {@code \f}, {@code
\n}, {@code \r}, {@code \t}, {@code \/},
+ * {@code \\} and the self-escaped quote character.
*/
private static String unescape(String value) {
StringBuilder result = new StringBuilder(value.length());
@@ -95,19 +93,19 @@ public class JSONParser implements JSONParserConstants {
case 'b':
result.append('\b');
break;
- case 'f':
+ case 'f':
result.append('\f');
break;
- case 'n':
+ case 'n':
result.append('\n');
break;
- case 'r':
+ case 'r':
result.append('\r');
break;
- case 't':
+ case 't':
result.append('\t');
break;
- default:
+ default:
result.append(next);
break;
}
@@ -736,7 +734,6 @@ public class JSONParser implements JSONParserConstants {
return new ParseException(token, exptokseq, tokenImage);
}
- private int trace_indent = 0;
private boolean trace_enabled;
/** Trace enabled. */
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]