This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch WW-4692-encoder-decoder in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/WW-4692-encoder-decoder by this push: new 70f76d3cb WW-4692 Prevents int promotion behaviour 70f76d3cb is described below commit 70f76d3cb56052617a3b7ab51c1f399aec5f0cc3 Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Wed Oct 26 11:21:16 2022 +0200 WW-4692 Prevents int promotion behaviour --- core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java b/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java index f3ae7d0c4..5b2ad73da 100644 --- a/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java +++ b/core/src/main/java/org/apache/struts2/url/StrutsUrlDecoder.java @@ -81,9 +81,9 @@ public class StrutsUrlDecoder implements UrlDecoder { b = (byte) ' '; } else if (b == '%') { if (ix + 2 > len) { - throw new IllegalArgumentException("The % character must be followed by two hexademical digits"); + throw new IllegalArgumentException("The % character must be followed by two hexadecimal digits"); } - b = (byte) ((convertHexDigit(bytes[ix++]) << 4) + convertHexDigit(bytes[ix++]) & 0xff ); + b = (byte) (((convertHexDigit(bytes[ix++]) << 4) + convertHexDigit(bytes[ix++])) & 0xff); } bytes[ox++] = b; }