You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "aherbert (via GitHub)" <gi...@apache.org> on 2023/07/16 07:24:26 UTC

[GitHub] [commons-email] aherbert commented on a diff in pull request #153: EMAIL-205: removed dead code

aherbert commented on code in PR #153:
URL: https://github.com/apache/commons-email/pull/153#discussion_r1264625263


##########
src/main/java/org/apache/commons/mail/EmailUtils.java:
##########
@@ -295,10 +295,6 @@ static String encodeUrl(final String input) throws UnsupportedEncodingException
         for (final byte c : input.getBytes(US_ASCII))
         {
             int b = c;
-            if (b < 0)

Review Comment:
   This is not dead code. It converts a signed 8-bit number (byte) to an unsigned 8-bit number, stored in an integer. It could be replaced with:
   ```Java
   int b = c & 0xff;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org