File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
perun-ldapc/src/main/java/cz/metacentrum/perun/ldapc/model/impl Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ public void addPrincipal(User user, String login) {
149149 if (isEppnEpuidLogin (login )) {
150150
151151 String [] oldEppns = entry .getStringAttributes (PerunAttribute .PerunAttributeNames .ldapAttrEduPersonPrincipalNames );
152+ if (oldEppns == null ) oldEppns = new String [0 ];
152153 TreeSet <String > uniqueEppns = new TreeSet <>(String .CASE_INSENSITIVE_ORDER );
153154 uniqueEppns .addAll (Stream .of (oldEppns ).collect (Collectors .toSet ()));
154155
@@ -161,6 +162,7 @@ public void addPrincipal(User user, String login) {
161162 }
162163
163164 String [] oldIdentities = entry .getStringAttributes (PerunAttribute .PerunAttributeNames .ldapAttrUserIdentities );
165+ if (oldIdentities == null ) oldIdentities = new String [0 ];
164166 TreeSet <String > uniqueIdentities = new TreeSet <>(String .CASE_INSENSITIVE_ORDER );
165167 uniqueIdentities .addAll (Stream .of (oldIdentities ).collect (Collectors .toSet ()));
166168
You can’t perform that action at this time.
0 commit comments