Author: anil.saldhana(a)jboss.com
Date: 2012-02-15 15:01:47 -0500 (Wed, 15 Feb 2012)
New Revision: 1396
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java
Log:
PLFED-250: avoid the NPE
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java 2012-02-15
19:39:38 UTC (rev 1395)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLStatusResponseTypeParser.java 2012-02-15
20:01:47 UTC (rev 1396)
@@ -129,6 +129,13 @@
//Peek at the next start element to see if it is status code
startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (startElement == null)
+ {
+ // Go to Status code end element.
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement,
JBossSAMLConstants.STATUS_CODE.get());
+ continue;
+ }
elementTag = startElement.getName().getLocalPart();
if (JBossSAMLConstants.STATUS_CODE.get().equals(elementTag))
{
Show replies by date