git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2840
ab3bd59b-922f-494d-bb5f-
6f0a3c29deca
* @return subject containing the merged information
*/
protected Subject mergeSubjects(Subject subject1, Subject subject2) {
+ if (subject1 == null && subject2 == null) {
+ return new Subject();
+ }
+
if (subject1 == null) {
return subject2;
}
return subject1;
}
- if (subject1 == null && subject2 == null) {
- return new Subject();
- }
-
Set<Principal> principals = new HashSet<Principal>(3);
principals.addAll(subject1.getPrincipals());
principals.addAll(subject2.getPrincipals());