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:
[email protected]


With regards,
Apache Git Services

Reply via email to