[java-identity-provider COMMIT] in /trunk/idp-core/src/main/java/net/shibboleth/idp/service: AbstractServicableCompon...

noreply at shibboleth.net noreply at shibboleth.net
Tue Dec 10 03:56:05 EST 2013


Author: rdw
Date: Tue Dec 10 03:56:04 2013
New Revision: 5011

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5011&view=rev
Log:
IDP-338  Class test was the wrong way around in the ReloadableSpringService. Fix scope of the Component support functions AbstractServiceableComponent

Modified:
    trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractServicableComponent.java
    trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java

Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractServicableComponent.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractServicableComponent.java?rev=5011&r1=5010&r2=5011&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractServicableComponent.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/service/AbstractServicableComponent.java Tue Dec 10 03:56:04 2013
@@ -115,17 +115,14 @@
      * {@inheritDoc}. Force unload; this will usually be a no-op since the component should have been explicitly
      * unloaded, but we do the unload here so that error cases also clean up.
      */
-    public void doDestroy() {
+    protected void doDestroy() {
         unloadComponent();
     }
 
     /** {@inheritDoc} */
-    public void doInitialize() throws ComponentInitializationException {
+    protected void doInitialize() throws ComponentInitializationException {
         super.doInitialize();
-        if (null == applicationContext) {
-            throw new ComponentInitializationException(getId() + ": No application context provided");
-        }
-        if (!(applicationContext instanceof ConfigurableApplicationContext)) {
+        if (applicationContext != null &&  !(applicationContext instanceof ConfigurableApplicationContext)) {
             throw new ComponentInitializationException(getId()
                     + ": Application context did not implement ConfigurableApplicationContext");
         }

Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java?rev=5011&r1=5010&r2=5011&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/service/ReloadableSpringService.java Tue Dec 10 03:56:04 2013
@@ -248,7 +248,7 @@
 
         log.debug("Testing that {} is a superclass of {}", theComponent.getClass(), theClaz);
 
-        if (!theComponent.getClass().isAssignableFrom(theClaz)) {
+        if (!theClaz.isAssignableFrom(theComponent.getClass())) {
             //
             // tear it down
             //



More information about the commits mailing list