Fix NPE if attribute statement is null
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 8 Jan 2008 06:19:34 +0000 (06:19 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 8 Jan 2008 06:19:34 +0000 (06:19 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2523 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java

index 93687ac..79b6ed1 100644 (file)
@@ -538,8 +538,10 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
                         .values());
             }
 
-            Subject statementSubject = buildSubject(requestContext, subjectConfMethod);
-            statment.setSubject(statementSubject);
+            if(statment != null){
+                Subject statementSubject = buildSubject(requestContext, subjectConfMethod);
+                statment.setSubject(statementSubject);
+            }
 
             return statment;
         } catch (AttributeRequestException e) {