提交 ca9f36f7 编写于 作者: V Vojtech Juranek 提交者: Kohsuke Kawaguchi

Use proper array lenght

See PR #1233 and discussion therein.
(cherry picked from commit b8c3f61c)
上级 6a2db71d
......@@ -50,7 +50,7 @@ public class LastGrantedAuthoritiesProperty extends UserProperty {
GrantedAuthority[] r = new GrantedAuthority[roles==null ? 1 : roles.length+1];
r[0] = SecurityRealm.AUTHENTICATED_AUTHORITY;
if (roles != null) {
for (int i = 1; i < roles.length; i++) {
for (int i = 1; i < r.length; i++) {
r[i] = new GrantedAuthorityImpl(roles[i - 1]);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册