Refactor of CFM code part 5 - SonarQube recommended code changes

previously:

Refactor of CFM code part 4 - Microsemi driver - updating modules.deps with the move of the driver code
Refactor of CFM code part 3 - Microsemi driver: moved everything out of drivers/microsemi to /drivers/microsemi/ea1000 to make room for future drivers
Refactor of CFM code parti 2 - API: moved everything from incubator/*/src/main/java/org/onosproject/incubator/net/l2monitoring to apps/cfm/*/src/main/java/org/onosproject/incubator/net/l2monitoring - this means that services belonging to l2 monitoring will now only be loaded when cfm app is started
Refactor of CFM code part 1 - NBI: moves the CLI and REST part of the app down a level to an nbi folder for a more consistent approach with other modules

Change-Id: I39b302fd8620f59d34ab41208cbc28765951aad4
diff --git a/apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java
index 6ead985..a31a407 100644
--- a/apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java
+++ b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java
@@ -82,8 +82,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementThreshold.*;
-
 /**
  * Enables the CFM REST Web Service component at /onos/cfm.
  * Each codec for the rest interfaces should be registered here.
@@ -95,6 +93,9 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected CodecService codecService;
 
+    /**
+     * On activation of this component register these codecs with the codec service.
+     */
     @Activate
     public void activate() {
         codecService.registerCodec(MaintenanceDomain.class,
@@ -146,7 +147,7 @@
                                         new LossAvailabilityStatHistoryCodec());
         codecService.registerCodec(CounterOption.class,
                                         new LmCounterOptionCodec());
-        codecService.registerCodec(ThresholdOption.class,
+        codecService.registerCodec(LossMeasurementThreshold.ThresholdOption.class,
                                         new LmThresholdOptionCodec());
 
         codecService.registerCodec(StartTime.class, new StartTimeCodec());
@@ -155,6 +156,9 @@
         log.info("CFM Web Component Started");
     }
 
+    /**
+     * On deactivation of this component unregister these codecs from the codec service.
+     */
     @Deactivate
     public void deactivate() {
         log.info("CFM Web Component Stopped");
@@ -189,7 +193,7 @@
         codecService.unregisterCodec(LossAvailabilityStatCurrent.class);
         codecService.unregisterCodec(LossAvailabilityStatHistory.class);
         codecService.unregisterCodec(CounterOption.class);
-        codecService.unregisterCodec(ThresholdOption.class);
+        codecService.unregisterCodec(LossMeasurementThreshold.ThresholdOption.class);
 
     }
 }