Author: anil.saldhana(a)jboss.com
Date: 2009-05-29 16:56:55 -0400 (Fri, 29 May 2009)
New Revision: 544
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/jboss/trust/SecurityActions.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
Log:
use checked exceptions
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/jboss/trust/SecurityActions.java
===================================================================
---
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/jboss/trust/SecurityActions.java 2009-05-29
20:56:24 UTC (rev 543)
+++
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/jboss/trust/SecurityActions.java 2009-05-29
20:56:55 UTC (rev 544)
@@ -90,17 +90,19 @@
*
* @param className the fully-qualified name of the class to be instantiated.
* @return a reference to the instantiated {@code Object}.
+ * @throws PrivilegedActionException
* @throws PrivilegedActionException if an error occurs while instantiating the class.
This exception wraps the real
* cause of the error, so classes using this method must perform a {@code
getCause()} in order to get a
* reference to the root of the error.
*/
- static Object instantiateClass(final String className) throws
PrivilegedActionException
+ static Object instantiateClass(final String className) throws
PrivilegedActionException
{
return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>()
{
public Object run() throws Exception
{
- Class<?> objectClass = loadClass(className);
+ Class<?> objectClass;
+ objectClass = loadClass(className);
return objectClass.newInstance();
}
});
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
===================================================================
---
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2009-05-29
20:56:24 UTC (rev 543)
+++
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2009-05-29
20:56:55 UTC (rev 544)
@@ -30,6 +30,8 @@
import java.util.List;
import javax.servlet.ServletException;
+import javax.xml.bind.JAXBException;
+import javax.xml.datatype.DatatypeConfigurationException;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Session;
@@ -57,6 +59,7 @@
import org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.jboss.identity.federation.saml.v2.protocol.AuthnRequestType;
import org.jboss.identity.federation.saml.v2.protocol.ResponseType;
+import org.xml.sax.SAXException;
/**
* Authenticator at the Service Provider
@@ -171,8 +174,8 @@
return super.authenticate(request, response, loginConfig);
}
- protected String createSAMLRequestMessage(String relayState, Response response)
- throws Exception
+ protected String createSAMLRequestMessage(String relayState, Response response)
+ throws ServletException, DatatypeConfigurationException, SAXException, JAXBException,
IOException
{
//create a saml request
if(this.serviceURL == null)
@@ -237,7 +240,10 @@
throw new RuntimeException("This authenticator does not handle
encryption");
}
- private Principal process(Request request, Response response) throws Exception
+ private Principal process(Request request, Response response)
+ throws IOException, GeneralSecurityException,
+ JAXBException, SAXException, ConfigurationException,
+ ParsingException, DatatypeConfigurationException
{
Principal userPrincipal = null;
Show replies by date