Revision 8492
Added by Jing Tao almost 11 years ago
src/edu/ucsb/nceas/metacat/AuthSession.java | ||
---|---|---|
96 | 96 |
// hence groups[] is generated from groupsWithDescription[][] |
97 | 97 |
String[][] groupsWithDescription = authService.getGroups(username, |
98 | 98 |
password, username); |
99 |
String groups[] = new String[groupsWithDescription.length]; |
|
99 |
String groups[] = null; |
|
100 |
if(groupsWithDescription != null) { |
|
101 |
groups = new String[groupsWithDescription.length]; |
|
100 | 102 |
|
101 |
for (int i = 0; i < groupsWithDescription.length; i++) { |
|
102 |
groups[i] = groupsWithDescription[i][0]; |
|
103 |
for (int i = 0; i < groupsWithDescription.length; i++) { |
|
104 |
groups[i] = groupsWithDescription[i][0]; |
|
105 |
} |
|
106 |
|
|
103 | 107 |
} |
104 |
|
|
108 |
|
|
105 | 109 |
if (groups == null) { |
106 |
groups = new String[0];
|
|
107 |
}
|
|
110 |
groups = new String[0];
|
|
111 |
}
|
|
108 | 112 |
|
109 | 113 |
String[] userInfo = authService.getUserInfo(username, password); |
110 | 114 |
|
Also available in: Unified diff
Add code to check if groups is null.