X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fshutdown-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fshutdown%2Fimpl%2FShutdownModule.java;h=d58ebf2895c327e2c55a4cc2f8ae2384c272edd8;hp=f6937f9ef1f976afd652d8b630cc53eff93ffa73;hb=refs%2Fchanges%2F75%2F4275%2F1;hpb=b93d03906c0e83f36db5c08458edc35a5710af66 diff --git a/opendaylight/config/shutdown-impl/src/main/java/org/opendaylight/controller/config/yang/shutdown/impl/ShutdownModule.java b/opendaylight/config/shutdown-impl/src/main/java/org/opendaylight/controller/config/yang/shutdown/impl/ShutdownModule.java index f6937f9ef1..d58ebf2895 100644 --- a/opendaylight/config/shutdown-impl/src/main/java/org/opendaylight/controller/config/yang/shutdown/impl/ShutdownModule.java +++ b/opendaylight/config/shutdown-impl/src/main/java/org/opendaylight/controller/config/yang/shutdown/impl/ShutdownModule.java @@ -16,13 +16,11 @@ import org.osgi.framework.Bundle; public final class ShutdownModule extends AbstractShutdownModule { private final Bundle systemBundle; - private final ShutdownModule nullableOldModule; public ShutdownModule(ModuleIdentifier identifier, Bundle systemBundle) { super(identifier, null); singletonCheck(identifier); this.systemBundle = systemBundle; - this.nullableOldModule = null; } public ShutdownModule(ModuleIdentifier identifier, ShutdownModule oldModule, java.lang.AutoCloseable oldInstance, @@ -30,7 +28,6 @@ public final class ShutdownModule extends AbstractShutdownModule { super(identifier, null, oldModule, oldInstance); singletonCheck(identifier); this.systemBundle = systemBundle; - this.nullableOldModule = oldModule; } private static void singletonCheck(ModuleIdentifier identifier) { @@ -52,40 +49,13 @@ public final class ShutdownModule extends AbstractShutdownModule { throw new UnsupportedOperationException(); } - @Override - public String getSecret() { - throw new UnsupportedOperationException(); - } - - @Override - public String getOldSecret() { - throw new UnsupportedOperationException(); - } - - String getActualSecret() { - return super.getSecret(); - } - - String getActualOldSecret() { - return super.getOldSecret(); - } - @Override protected void customValidation() { - JmxAttributeValidationException.checkNotNull(super.getOldSecret(), oldSecretJmxAttribute); JmxAttributeValidationException.checkNotNull(super.getSecret(), secretJmxAttribute); - if (nullableOldModule != null) { - // if nothing changed, remain valid - boolean sameAsOldModule = isSame(nullableOldModule); - if (sameAsOldModule == false) { - boolean valid = getActualOldSecret().equals(nullableOldModule.getActualSecret()); - JmxAttributeValidationException.checkCondition(valid, "Invalid old secret", oldSecretJmxAttribute); - } - } } @Override public java.lang.AutoCloseable createInstance() { - return new ShutdownServiceImpl(getActualSecret(), systemBundle, getRootRuntimeBeanRegistratorWrapper()); + return new ShutdownServiceImpl(getSecret(), systemBundle, getRootRuntimeBeanRegistratorWrapper()); } }