提交 60846106 编写于 作者: O olivier lamy

ArrayList construction not needed all the time

上级 176ec80c
......@@ -60,10 +60,10 @@ public class WhoAmI implements UnprotectedRootAction {
@Exported
public String[] getAuthorities() {
List <String> authorities = new ArrayList<String>();
if (auth().getAuthorities() == null) {
return new String[0];
}
List <String> authorities = new ArrayList<String>();
for (GrantedAuthority a : auth().getAuthorities()) {
authorities.add(a.getAuthority());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册