You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/01/30 10:38:59 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #3275: [CLOUDSTACK-10408] Fix String.replaceAll() to replace() for better performance

weizhouapache commented on a change in pull request #3275: [CLOUDSTACK-10408] Fix String.replaceAll() to replace() for better performance
URL: https://github.com/apache/cloudstack/pull/3275#discussion_r372870798
 
 

 ##########
 File path: server/src/main/java/com/cloud/user/AccountManagerImpl.java
 ##########
 @@ -2326,9 +2326,9 @@ public UserAccount authenticateUser(final String username, final String password
 
                 // Block when is not in the list of allowed IPs
                 if (!NetUtils.isIpInCidrList(loginIpAddress, accessAllowedCidrs.split(","))) {
-                    s_logger.warn("Request by account '" + account.toString() + "' was denied since " + loginIpAddress.toString().replaceAll("/", "") + " does not match " + accessAllowedCidrs);
+                    s_logger.warn("Request by account '" + account.toString() + "' was denied since " + loginIpAddress.toString().replace("/", "") + " does not match " + accessAllowedCidrs);
 
 Review comment:
   looks good. there is only 1 "/" in the string.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services