zongtanghu commented on a change in pull request #1572: [ISSUE #1558]module 
`acl` compatible with 1.6
URL: https://github.com/apache/rocketmq/pull/1572#discussion_r358068265
 
 

 ##########
 File path: acl/src/main/java/org/apache/rocketmq/acl/common/Permission.java
 ##########
 @@ -59,19 +59,19 @@ public static byte parsePermFromString(String permString) {
         if (permString == null) {
             return Permission.DENY;
         }
-        switch (permString.trim()) {
-            case "PUB":
-                return Permission.PUB;
-            case "SUB":
-                return Permission.SUB;
-            case "PUB|SUB":
-                return Permission.PUB | Permission.SUB;
-            case "SUB|PUB":
-                return Permission.PUB | Permission.SUB;
-            case "DENY":
-                return Permission.DENY;
-            default:
-                return Permission.DENY;
+        String permTrimString = permString.trim();
+        if ("PUB".equals(permTrimString)) {
 
 Review comment:
   Here,you can write the codes,such as "if (permTrimString.equals("PUB"))".

----------------------------------------------------------------
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