Fixed a bug in auth method defaulting.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 7 Apr 2005 21:28:20 +0000 (21:28 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 7 Apr 2005 21:28:20 +0000 (21:28 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1386 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/IdPConfig.java

index 5df600f..c078abf 100644 (file)
@@ -54,8 +54,7 @@ public class IdPConfig {
 
        public IdPConfig(Element config) throws ShibbolethConfigurationException {
 
-               if (!config.getTagName().equals("IdPConfig") && !config.getTagName().equals("ShibbolethOriginConfig")) { 
-                       throw new ShibbolethConfigurationException(
+               if (!config.getTagName().equals("IdPConfig") && !config.getTagName().equals("ShibbolethOriginConfig")) { throw new ShibbolethConfigurationException(
                                "Unexpected configuration data.  <IdPConfig/> is needed."); }
 
                log.debug("Loading global configuration properties.");
@@ -106,12 +105,13 @@ public class IdPConfig {
                                // Shouldn't happen
                                throw new ShibbolethConfigurationException("Default Auth Method URI could not be constructed.");
                        }
-               }
-               try {
-                       defaultAuthMethod = new URI(attribute);
-               } catch (URISyntaxException e1) {
-                       log.error("(defaultAuthMethod) attribute to is not a valid URI.");
-                       throw new ShibbolethConfigurationException("Required configuration is invalid.");
+               } else {
+                       try {
+                               defaultAuthMethod = new URI(attribute);
+                       } catch (URISyntaxException e1) {
+                               log.error("(defaultAuthMethod) attribute to is not a valid URI.");
+                               throw new ShibbolethConfigurationException("Required configuration is invalid.");
+                       }
                }
 
                attribute = ((Element) config).getAttribute("maxHSThreads");