Author: anil.saldhana(a)jboss.com
Date: 2010-11-30 11:20:18 -0500 (Tue, 30 Nov 2010)
New Revision: 571
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLConditionsParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSubjectParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
Log:
add guards
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAssertionParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -70,6 +70,8 @@
String endElementTag = StaxParserUtil.getEndElementName( endElement );
if( endElementTag.equals( JBossSAMLConstants.ASSERTION.get() ) )
break;
+ else
+ throw new RuntimeException( "Unknown End Element:" +
endElementTag );
}
StartElement peekedElement = null;
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLAuthNRequestParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -68,6 +68,8 @@
startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
authnRequest.setNameIDPolicy( getNameIDPolicy( startElement ));
}
+ else
+ throw new RuntimeException( "Unknown Element:" + elementName );
}
return authnRequest;
}
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLConditionsParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLConditionsParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLConditionsParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -166,6 +166,8 @@
StaxParserUtil.getNextEvent(xmlEventReader); //Just get the end element
break;
}
+ else
+ throw new RuntimeException( "Unknown End Element:" +
StaxParserUtil.getEndElementName( endElement ) );
}
}
return audience;
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSubjectParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSubjectParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/saml/SAMLSubjectParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -70,6 +70,8 @@
EndElement endElement = (EndElement) xmlEvent;
if( StaxParserUtil.matches(endElement , JBossSAMLConstants.SUBJECT.get() ))
break;
+ else
+ throw new RuntimeException( "Unknown End Element:" +
StaxParserUtil.getEndElementName( endElement ) );
}
StartElement peekedElement = StaxParserUtil.peekNextStartElement(
xmlEventReader );
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -85,6 +85,8 @@
String endElementTag = StaxParserUtil.getEndElementName( endElement );
if( endElementTag.equals( WSTrustConstants.RST ) )
break;
+ else
+ throw new RuntimeException( "Unknown End Element:" +
StaxParserUtil.getEndElementName( endElement ) );
}
try
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java 2010-11-30
16:07:32 UTC (rev 570)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java 2010-11-30
16:20:18 UTC (rev 571)
@@ -91,6 +91,8 @@
String endElementTag = StaxParserUtil.getEndElementName(endElement);
if (endElementTag.equals(WSTrustConstants.RSTR))
break;
+ else
+ throw new RuntimeException( "Unknown End Element:" +
StaxParserUtil.getEndElementName( endElement ) );
}
try