X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager-facade-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Ffacade%2Fxml%2Fstrategy%2FReCreateEditConfigStrategy.java;h=776abdce40a79db7fe7801e9d76bf8cc6345f012;hb=2d60632f7cf63712e8357a3cf3fc40d83366e5e6;hp=8df51a2a8f7cdd1cdfe53ff72e26d7a287ec556d;hpb=f336ffef3aaf674ba23133cb5c5201105e5d8637;p=controller.git diff --git a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/ReCreateEditConfigStrategy.java b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/ReCreateEditConfigStrategy.java index 8df51a2a8f..776abdce40 100644 --- a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/ReCreateEditConfigStrategy.java +++ b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/strategy/ReCreateEditConfigStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016, 2017 Brocade Communications Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -17,7 +17,8 @@ import org.opendaylight.controller.config.util.ConfigTransactionClient; import org.opendaylight.controller.config.util.xml.DocumentedException; /** - * Edit strategy that forces re-creation of a module instance even if the config didn't change. + * Edit strategy that forces re-creation of a module instance even if the config + * didn't change. * * @author Thomas Pantelis */ @@ -28,8 +29,7 @@ public class ReCreateEditConfigStrategy extends AbstractEditConfigStrategy { String module, String instance, ServiceRegistryWrapper services) throws ConfigHandlingException { throw new ConfigHandlingException( String.format("Unable to recreate %s : %s, Existing module instance not found", module, instance), - DocumentedException.ErrorType.APPLICATION, - DocumentedException.ErrorTag.OPERATION_FAILED, + DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED, DocumentedException.ErrorSeverity.ERROR); } @@ -38,10 +38,9 @@ public class ReCreateEditConfigStrategy extends AbstractEditConfigStrategy { ObjectName objectName, ServiceRegistryWrapper services) throws ConfigHandlingException { try { ta.reCreateModule(objectName); - } catch(InstanceNotFoundException e) { + } catch (InstanceNotFoundException e) { throw new ConfigHandlingException(String.format("Unable to recreate instance for %s", objectName), - DocumentedException.ErrorType.APPLICATION, - DocumentedException.ErrorTag.OPERATION_FAILED, + e, DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED, DocumentedException.ErrorSeverity.ERROR); } }