shenshaoming opened a new issue #2826:
URL: https://github.com/apache/rocketmq/issues/2826
I found two warnings in org.apache.rocketmq.common.constant.PerNameļ¼and the
second warnings is more important.
1. useless bit operation
`public static final int PERM_INHERIT = 0x1 << 0;`
2. useless StringBuffer
In method perm2String(final int perm), create a SpringBuffer obj inside this
method, which means it can't be puzzled by thread safe.Should use StringBuilder
instead.
```
public static String perm2String(final int perm) {
final StringBuffer sb = new StringBuffer("---");
if (isReadable(perm)) {
sb.replace(0, 1, "R");
}
if (isWriteable(perm)) {
sb.replace(1, 2, "W");
}
if (isInherited(perm)) {
sb.replace(2, 3, "X");
}
return sb.toString();
}
```
--
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]