From 1b4af2baa406841631ef7c3bf6917be654f793e1 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Mon, 21 Jan 2019 11:21:08 -0500 Subject: [PATCH] Correct style issues Change-Id: Icadd241369437b6c1e868285f79b31be2d730871 Issue-ID: INT-824 Signed-off-by: Marco Platania --- vnfs/honeycomb_plugin/parent-pom/pom.xml | 2 +- .../stream-count/stream-count-api/pom.xml | 2 +- .../stream-count/stream-count-impl/pom.xml | 2 +- .../fd/honeycomb/lcmapi/write/ElementCustomizer.java | 20 +++++++++++--------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/vnfs/honeycomb_plugin/parent-pom/pom.xml b/vnfs/honeycomb_plugin/parent-pom/pom.xml index b87f8a34..eb841042 100644 --- a/vnfs/honeycomb_plugin/parent-pom/pom.xml +++ b/vnfs/honeycomb_plugin/parent-pom/pom.xml @@ -27,7 +27,7 @@ org.onap.demo.vnf demo-aggregator 1.4.0-SNAPSHOT - ../../../../pom.xml + ../../../pom.xml diff --git a/vnfs/honeycomb_plugin/stream-count/stream-count-api/pom.xml b/vnfs/honeycomb_plugin/stream-count/stream-count-api/pom.xml index 52c82fea..3bc79adc 100644 --- a/vnfs/honeycomb_plugin/stream-count/stream-count-api/pom.xml +++ b/vnfs/honeycomb_plugin/stream-count/stream-count-api/pom.xml @@ -59,7 +59,7 @@ yang-ext - + diff --git a/vnfs/honeycomb_plugin/stream-count/stream-count-impl/pom.xml b/vnfs/honeycomb_plugin/stream-count/stream-count-impl/pom.xml index f04cb9b0..25d6d765 100644 --- a/vnfs/honeycomb_plugin/stream-count/stream-count-impl/pom.xml +++ b/vnfs/honeycomb_plugin/stream-count/stream-count-impl/pom.xml @@ -72,7 +72,7 @@ ${guice.version} - + diff --git a/vnfs/honeycomb_plugin/stream-count/stream-count-impl/src/main/java/io/fd/honeycomb/lcmapi/write/ElementCustomizer.java b/vnfs/honeycomb_plugin/stream-count/stream-count-impl/src/main/java/io/fd/honeycomb/lcmapi/write/ElementCustomizer.java index 92a4cfec..740ffdf7 100644 --- a/vnfs/honeycomb_plugin/stream-count/stream-count-impl/src/main/java/io/fd/honeycomb/lcmapi/write/ElementCustomizer.java +++ b/vnfs/honeycomb_plugin/stream-count/stream-count-impl/src/main/java/io/fd/honeycomb/lcmapi/write/ElementCustomizer.java @@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory; public final class ElementCustomizer implements WriterCustomizer { - private static final Logger LOG = LoggerFactory.getLogger(ElementCustomizer.class); + private static final Logger LOG = LoggerFactory.getLogger(ElementCustomizer.class); private final CrudService crudService; @@ -55,10 +55,11 @@ public final class ElementCustomizer implements WriterCustomizer { //invoked by PUT operation,if provided data doesn't exist in Config data crudService.writeData(id, dataAfter); try { - runScript(dataAfter.getActiveStreams().getValue()); + runScript(dataAfter.getActiveStreams().getValue()); } catch (IOException e) { - LOG.error("Write operation failed: " + e); + String message = "Write operation failed " + e; + LOG.error(message); } } @@ -67,13 +68,14 @@ public final class ElementCustomizer implements WriterCustomizer { @Nonnull final Streams dataBefore, @Nonnull final Streams dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { - //invoked by PUT operation,if provided data does exist in Config data - crudService.updateData(id, dataBefore, dataAfter); - try { - runScript(dataAfter.getActiveStreams().getValue()); + //invoked by PUT operation,if provided data does exist in Config data + crudService.updateData(id, dataBefore, dataAfter); + try { + runScript(dataAfter.getActiveStreams().getValue()); } catch (IOException e) { - LOG.error("Update operation failed: " + e); + String message = "Write operation failed " + e; + LOG.error(message); } } @@ -90,7 +92,7 @@ public final class ElementCustomizer implements WriterCustomizer { //Update the number of running streams running a custom script that uses the old vPacketGen REST APIs private void runScript(long streams) throws IOException { - String script = new String("bash /opt/update_running_streams.sh " + streams); + String script = new String("bash /opt/update_running_streams.sh " + streams); Runtime.getRuntime().exec(script); String message = "Number of running streams updated to " + streams; LOG.info(message); -- 2.16.6