diff options
Diffstat (limited to 'libjava/classpath/javax/security/auth/SubjectDomainCombiner.java')
-rw-r--r-- | libjava/classpath/javax/security/auth/SubjectDomainCombiner.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libjava/classpath/javax/security/auth/SubjectDomainCombiner.java b/libjava/classpath/javax/security/auth/SubjectDomainCombiner.java index 94a7160eb18..927e7479df6 100644 --- a/libjava/classpath/javax/security/auth/SubjectDomainCombiner.java +++ b/libjava/classpath/javax/security/auth/SubjectDomainCombiner.java @@ -1,5 +1,5 @@ /* SubjectDomainCombiner.java -- domain combiner for Subjects. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,8 +67,9 @@ public class SubjectDomainCombiner implements DomainCombiner final ProtectionDomain[] assigned) { LinkedList domains = new LinkedList(); - Principal[] principals = - (Principal[]) subject.getPrincipals().toArray (new Principal[0]); + Principal[] principals = null; + if (subject != null) + principals = (Principal[]) subject.getPrincipals().toArray (new Principal[0]); if (current != null) { for (int i = 0; i < current.length; i++) |