Skip to content

Commit

Permalink
cismet/cismet-gui-commons#11 impl ... reduce numer of exceptions when…
Browse files Browse the repository at this point in the history
… no tunnel.targetgroup attribute is set
  • Loading branch information
helllth committed Sep 28, 2012
1 parent a5b4e10 commit 0c65533
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/de/cismet/cids/client/tools/CallServerTunnel.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,14 @@ private ArrayList<String> getUserKeyList() {
if (userKeyList == null) {
user = SessionManager.getSession().getUser();
final String configAttr = SessionManager.getProxy().getConfigAttr(user, "tunnel.targetgroups");
final String[] keys = configAttr.split(",");
userKeyList = new ArrayList<String>(keys.length);
for (final String s : keys) {
userKeyList.add(s.trim());
if (configAttr != null) {
final String[] keys = configAttr.split(",");
userKeyList = new ArrayList<String>(keys.length);
for (final String s : keys) {
userKeyList.add(s.trim());
}
} else {
userKeyList = new ArrayList<String>(1);
}
}
}
Expand Down

0 comments on commit 0c65533

Please sign in to comment.