Fix NullPointers when providerId is unknown.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 24 Jan 2004 05:59:40 +0000 (05:59 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 24 Jan 2004 05:59:40 +0000 (05:59 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@857 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/common/ShibPOSTProfile.java

index 3e34021..4763c31 100755 (executable)
@@ -332,8 +332,10 @@ public class ShibPOSTProfile {
                Document doc = org.opensaml.XML.parserPool.newDocument();
 
                ArrayList audiences = new ArrayList();
-               audiences.add(relyingParty.getProviderId());
-               if (!relyingParty.getProviderId().equals(relyingParty.getName())) {
+               if (relyingParty.getProviderId() != null) {
+                       audiences.add(relyingParty.getProviderId());
+               }
+               if (relyingParty.getName() != null && !relyingParty.getName().equals(relyingParty.getProviderId())) {
                        audiences.add(relyingParty.getName());
                }