javeme commented on code in PR #2143:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2143#discussion_r1135728159


##########
hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java:
##########
@@ -261,16 +262,15 @@ private void decode(byte[] bytes) throws 
AuthenticationException {
             int end = bytes.length;
 
             for (int i = bytes.length - 1; i >= 0; i--) {
-                if (bytes[i] == NUL) {
-                    if (this.password == null) {
-                        password = new String(Arrays.copyOfRange(bytes, i + 1, 
end),
-                                              StandardCharsets.UTF_8);
-                    } else if (this.username == null) {
-                        username = new String(Arrays.copyOfRange(bytes, i + 1, 
end),
-                                              StandardCharsets.UTF_8);
-                    }
-                    end = i;
+                if (bytes[i] != NUL) continue;

Review Comment:
   expect this style:
   ```java
   if (xx) {
       continue;
   }
   ```



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to