This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-email.git
The following commit(s) were added to refs/heads/master by this push:
new 439dc9c Use Byte.toUnsignedInt(byte)
439dc9c is described below
commit 439dc9c03487ce3bfb7d21baccb09d017439cb8c
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Dec 7 17:01:35 2024 -0500
Use Byte.toUnsignedInt(byte)
---
.../src/main/java/org/apache/commons/mail2/core/EmailUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/commons-email2-core/src/main/java/org/apache/commons/mail2/core/EmailUtils.java
b/commons-email2-core/src/main/java/org/apache/commons/mail2/core/EmailUtils.java
index d03c055..23f685a 100644
---
a/commons-email2-core/src/main/java/org/apache/commons/mail2/core/EmailUtils.java
+++
b/commons-email2-core/src/main/java/org/apache/commons/mail2/core/EmailUtils.java
@@ -99,7 +99,7 @@ public final class EmailUtils {
}
final StringBuilder builder = new StringBuilder();
for (final byte c : input.getBytes(StandardCharsets.US_ASCII)) {
- final int b = c & 0xff;
+ final int b = Byte.toUnsignedInt(c);
if (SAFE_URL.get(b)) {
builder.append((char) b);
} else {