Revert "Revert "Minor Checkstyle fix Custom Import Order error"" 55/58155/3
authorSam Hague <shague@redhat.com>
Fri, 2 Jun 2017 00:04:05 +0000 (00:04 +0000)
committerSam Hague <shague@redhat.com>
Fri, 2 Jun 2017 04:33:25 +0000 (04:33 +0000)
This reverts commit 0cb7bc37f4a94363ddb994c07fa43611d57edddd.

Change-Id: I1155651e318112ef3b8b2c0a8b8a3304399f98a7
Signed-off-by: Sam Hague <shague@redhat.com>
17 files changed:
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Multipath.java
vpnservice/bgpmanager/bgpmanager-impl/src/test/java/org/opendaylight/netvirt/bgpmanager/thrift/client/BgpRouterAddNeighborTest.java
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceStateChangeListener.java
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/merge/GlobalAugmentationMerger.java
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanForwardingEntriesHandler.java
vpnservice/ipv6service/impl/src/test/java/org/opendaylight/netvirt/ipv6service/Ipv6TestUtils.java
vpnservice/policyservice/impl/src/main/java/org/opendaylight/netvirt/policyservice/PolicyAceFlowProgrammer.java
vpnservice/policyservice/impl/src/main/java/org/opendaylight/netvirt/policyservice/listeners/UnderlayNetworkDpnListener.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosAlertManager.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosAlertPortData.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosInterfaceStateChangeListener.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosNeutronNetworkChangeListener.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosNeutronPortChangeListener.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosNeutronUtils.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosNodeListener.java
vpnservice/qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosPolicyChangeListener.java

index 6efe4ab2f6e8fe7473e2c3b9fa536b097f8f3c83..04d222c451c2541a0c89420e1793fb0742ed8883 100755 (executable)
@@ -39,7 +39,6 @@ import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import javax.annotation.Nullable;
-
 import org.apache.thrift.TException;
 import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker;
 import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
@@ -124,8 +123,6 @@ import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
-
 public class BgpConfigurationManager {
     private static final Logger LOG = LoggerFactory.getLogger(BgpConfigurationManager.class);
     private static DataBroker dataBroker;
@@ -339,7 +336,7 @@ public class BgpConfigurationManager {
 
     private String getProperty(String var, String def) {
         String property = bundleContext.getProperty(var);
-        return (property == null ? def : property);
+        return property == null ? def : property;
     }
 
     static boolean ignoreClusterDcnEventForFollower() {
@@ -1066,11 +1063,11 @@ public class BgpConfigurationManager {
                     return;
                 }
                 Long label = val.getLabel();
-                int lbl = (label == null) ? qbgpConstants.LBL_NO_LABEL
+                int lbl = label == null ? qbgpConstants.LBL_NO_LABEL
                         : label.intValue();
-                int l3vni = (val.getL3vni() == null) ? qbgpConstants.LBL_NO_LABEL
+                int l3vni = val.getL3vni() == null ? qbgpConstants.LBL_NO_LABEL
                         : val.getL3vni().intValue();
-                int l2vni = (val.getL2vni() == null) ? qbgpConstants.LBL_NO_LABEL
+                int l2vni = val.getL2vni() == null ? qbgpConstants.LBL_NO_LABEL
                         : val.getL2vni().intValue();
 
                 BgpControlPlaneType protocolType = val.getBgpControlPlaneType();
@@ -1111,7 +1108,7 @@ public class BgpConfigurationManager {
                     return;
                 }
                 Long label = val.getLabel();
-                int lbl = (label == null) ? 0 : label.intValue();
+                int lbl = label == null ? 0 : label.intValue();
                 int  afiInt = testValueAFI(pfxlen);
                 if (rd == null && lbl > 0) {
                     //LU prefix is being deleted.
@@ -1884,7 +1881,7 @@ public class BgpConfigurationManager {
             return cHostStartup;
         }
         ConfigServer ts = config.getConfigServer();
-        return (ts == null ? cHostStartup : ts.getHost().getValue());
+        return ts == null ? cHostStartup : ts.getHost().getValue();
     }
 
     public static int getConfigPort() {
@@ -1892,8 +1889,8 @@ public class BgpConfigurationManager {
             return Integer.parseInt(cPortStartup);
         }
         ConfigServer ts = config.getConfigServer();
-        return (ts == null ? Integer.parseInt(cPortStartup) :
-                ts.getPort().intValue());
+        return ts == null ? Integer.parseInt(cPortStartup) :
+                ts.getPort().intValue();
     }
 
     public static Bgp getConfig() {
@@ -1947,7 +1944,7 @@ public class BgpConfigurationManager {
             IpAddress routerId = asId.getRouterId();
             Long spt = asId.getStalepathTime();
             Boolean afb = asId.isAnnounceFbit();
-            String rid = (routerId == null) ? "" : new String(routerId.getValue());
+            String rid = routerId == null ? "" : new String(routerId.getValue());
             int stalepathTime = (int) getStalePathtime(RESTART_DEFAULT_GR, config.getAsId());
             boolean announceFbit = true;
             try {
@@ -2009,11 +2006,11 @@ public class BgpConfigurationManager {
                     String pfxlen = net.getPrefixLen();
                     String nh = net.getNexthop().getValue();
                     Long label = net.getLabel();
-                    int lbl = (label == null) ? 0 : label.intValue();
-                    int l3vni = (net.getL3vni() == null) ? 0 : net.getL3vni().intValue();
-                    int l2vni = (net.getL2vni() == null) ? 0 : net.getL2vni().intValue();
+                    int lbl = label == null ? 0 : label.intValue();
+                    int l3vni = net.getL3vni() == null ? 0 : net.getL3vni().intValue();
+                    int l2vni = net.getL2vni() == null ? 0 : net.getL2vni().intValue();
                     Long afi = net.getAfi();
-                    int afint = (afi == null) ? (int) af_afi.AFI_IP.getValue() : afi.intValue();
+                    int afint = afi == null ? (int) af_afi.AFI_IP.getValue() : afi.intValue();
                     if (rd == null && lbl > 0) {
                         //LU prefix is being deleted.
                         rd = Integer.toString(lbl);
@@ -2099,7 +2096,7 @@ public class BgpConfigurationManager {
     }
 
     public void startBgp(long as, String routerId, int spt, boolean fbit) {
-        IpAddress rid = (routerId == null) ? null : new IpAddress(routerId.toCharArray());
+        IpAddress rid = routerId == null ? null : new IpAddress(routerId.toCharArray());
         Long staleTime = (long) spt;
         InstanceIdentifier.InstanceIdentifierBuilder<AsId> iib =
                 InstanceIdentifier.builder(Bgp.class).child(AsId.class);
@@ -2385,7 +2382,7 @@ public class BgpConfigurationManager {
              * to complete (or)wait for max timeout value of STALE_FIB_WAIT Seconds.
              */
             int retry = STALE_FIB_WAIT;
-            while ((BgpUtil.getGetPendingWrTransaction() != 0) && (retry > 0)) {
+            while (BgpUtil.getGetPendingWrTransaction() != 0 && retry > 0) {
                 Thread.sleep(1000);
                 retry--;
                 if (retry == 0) {
@@ -2447,7 +2444,7 @@ public class BgpConfigurationManager {
              */
             int retry = STALE_FIB_WAIT;
             String rd;
-            while ((BgpUtil.getGetPendingWrTransaction() != 0) && (retry > 0)) {
+            while (BgpUtil.getGetPendingWrTransaction() != 0 && retry > 0) {
                 Thread.sleep(1000);
                 retry--;
                 if (retry == 0) {
index cf770079eb7e0a5b6d384f48680e3315c1de91ed..45820df99a5aa69f0e4474c7403619a0b43a5887 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.netvirt.bgpmanager.commands;
 
-
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
 import org.apache.karaf.shell.commands.Option;
@@ -29,24 +28,26 @@ public class Multipath extends OsgiCommandSupport {
             description = "rd",
             required = false,
             multiValued = false)
-    String rd = null;
+    String rd;
 
     @Option(name = MAXPATH, aliases = { "-n" },
             description = "max number of paths",
             required = false,
             multiValued = false)
-    String maxpath = null;
+    String maxpath;
 
     @Option(name = AF, aliases = {"-f"},
             description = "Address family",
             required = true, multiValued = false)
-    String addrFamily = null;
+
+    String addrFamily;
 
 
     @Argument(name = "enable|disable|setmaxpath",
             description = "The desired operation",
             required = true, multiValued = false)
-    private String multipathEnable = null;
+
+    String multipathEnable;
 
     @Override
     protected Object doExecute() throws Exception {
@@ -89,7 +90,6 @@ public class Multipath extends OsgiCommandSupport {
                 default:
                     return usage();
             }
-
         }
 
         return null;
@@ -100,6 +100,5 @@ public class Multipath extends OsgiCommandSupport {
                 + "odl:multipath -f lu -r <rd> -n <maxpath> setmaxpath");
         return null;
     }
-
 }
 
index a2b71348ef2c3fc46203a91d35a32380e06bb6f4..e936facd1906f0d30fbe7bbd759bbeefb27a7413 100644 (file)
@@ -12,8 +12,6 @@ import static org.junit.Assert.fail;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.when;
 
-
-
 import com.google.common.truth.Expect;
 import org.apache.thrift.TException;
 import org.junit.Before;
index 200614d718d8045e0cae48198502acd2263e8a81..d3aa6b69e71a051222452669c273530774a81241 100644 (file)
@@ -7,9 +7,7 @@
  */
 package org.opendaylight.netvirt.elan.internal;
 
-
 import java.math.BigInteger;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
index eb114e89e050f84ca2e744320992d1385aafa2f5..c1c055f79098d4f576eb8dc7a08ae83155455bac 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netvirt.elan.l2gw.ha.merge;
 
-
 import org.opendaylight.netvirt.elan.l2gw.ha.commands.LocalMcastCmd;
 import org.opendaylight.netvirt.elan.l2gw.ha.commands.LocalUcastCmd;
 import org.opendaylight.netvirt.elan.l2gw.ha.commands.LogicalSwitchesCmd;
index ed5371370767b4b36543e85582b52186920efd66..49ce7e0a24e52baab6785de55832c378cf4a1270 100644 (file)
@@ -5,11 +5,8 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netvirt.elan.utils;
 
-
-
 import com.google.common.base.Optional;
 import javax.inject.Inject;
 import javax.inject.Singleton;
index 597860664139ce04e50d603079dbae03cbb9880f..5c94334ff7fbfae20d7f1efc0f55c8f21f508c49 100644 (file)
@@ -8,9 +8,7 @@
 
 package org.opendaylight.netvirt.policyservice;
 
-
 import com.google.common.base.Optional;
-
 import java.math.BigInteger;
 import java.util.Collections;
 import java.util.List;
@@ -18,10 +16,8 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-
 import javax.inject.Inject;
 import javax.inject.Singleton;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.genius.datastoreutils.DataStoreJobCoordinator;
@@ -83,13 +79,13 @@ public class PolicyAceFlowProgrammer {
             return;
         }
 
-        List<InstructionInfo> instructions = (addOrRemove == NwConstants.ADD_FLOW)
+        List<InstructionInfo> instructions = addOrRemove == NwConstants.ADD_FLOW
                 ? getPolicyClassifierInstructions(policyClassifierOpt.get()) : null;
         programAceFlows(ace, instructions, dpId, addOrRemove);
     }
 
     public void programAceFlows(Ace ace, String policyClassifierName, List<BigInteger> dpIds, int addOrRemove) {
-        List<InstructionInfo> instructions = (addOrRemove == NwConstants.ADD_FLOW)
+        List<InstructionInfo> instructions = addOrRemove == NwConstants.ADD_FLOW
                 ? getPolicyClassifierInstructions(policyClassifierName) : null;
         dpIds.forEach(dpId -> {
             programAceFlows(ace, instructions, dpId, addOrRemove);
index cb32f50fda97576513b74f60b416c6a96d2d0d02..b50c139eba115266fe1695de14ede4bf5d68300d 100644 (file)
@@ -8,17 +8,14 @@
 
 package org.opendaylight.netvirt.policyservice.listeners;
 
-
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
-
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
index b34ebbc0783c1ae6aaf9efe32d446e194122a8a9..691ce671fbba76a2f51d4d3addbad46b84b84dc4 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.netvirt.qosservice;
 
-
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
index 158c1465e255df130836b7b894e4b31515a6017d..d1b74bc86bab6ea4b18ed99102344444ec9b9c36 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.netvirt.qosservice;
 
-
 import java.math.BigInteger;
 import org.opendaylight.netvirt.neutronvpn.interfaces.INeutronVpnManager;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port;
@@ -18,7 +17,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class QosAlertPortData {
-    private Port port;
+    private final Port port;
     private static INeutronVpnManager neutronVpnManager;
     private BigInteger rxPackets;
     private BigInteger rxDroppedPackets;
index aed211a47323cc7d7efa5a81d4e375f3d6750173..53190dc7e9ad482b835e55b3494cdbfd187f788f 100644 (file)
@@ -6,11 +6,8 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-
 package org.opendaylight.netvirt.qosservice;
 
-
-
 import com.google.common.base.Optional;
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
index 7464a493c00b435dd62f1450677138d4ad970980..80714a8417414d8111e56dfce7b70884c09fdcd8 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netvirt.qosservice;
 
-
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 import javax.inject.Singleton;
index c190dbe28333bf8f4776ffe1f4355a712e90948d..3f9b95b3b3fb2d825aa56219420440598015237a 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netvirt.qosservice;
 
-
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.math.BigInteger;
@@ -317,10 +316,10 @@ public class QosNeutronUtils {
                                                      Network network, Uuid qosUuid) {
         LOG.trace("Handling Network QoS update: net: {} qosservice: {}", network.getUuid(), qosUuid);
         QosPolicy qosPolicy = QosNeutronUtils.qosPolicyMap.get(qosUuid);
-        if (qosPolicy == null || ((qosPolicy.getBandwidthLimitRules() == null
+        if (qosPolicy == null || (qosPolicy.getBandwidthLimitRules() == null
                 || qosPolicy.getBandwidthLimitRules().isEmpty())
                 && (qosPolicy.getDscpmarkingRules() == null
-                || qosPolicy.getDscpmarkingRules().isEmpty()))) {
+                || qosPolicy.getDscpmarkingRules().isEmpty())) {
             return;
         }
         List<Uuid> subnetIds = QosNeutronUtils.getSubnetIdsFromNetworkId(db, network.getUuid());
index a27ec41cd3de3f2c2ff228462e7fdc0ce50109d3..2785a34362e3f692a8e1e080dcdb7f80b5e8e64d 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netvirt.qosservice;
 
-
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
index bf2088dbcab7f83df5765aefaceb5de6451bce54..777625fd10fa1c4ceff4162f522c18a5bf071473 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netvirt.qosservice;
 
-
 import com.google.common.util.concurrent.ListenableFuture;
 import java.math.BigInteger;
 import java.util.ArrayList;
@@ -148,6 +147,7 @@ public class QosPolicyChangeListener extends AsyncDataTreeChangeListenerBase<Qos
         }
     }
 
+    @Override
     protected void add(InstanceIdentifier<QosPolicy> identifier, QosPolicy input) {
         LOG.trace("Adding  QosPolicy : key: {}, value={}", identifier, input);
         QosNeutronUtils.addToQosPolicyCache(input);
@@ -214,6 +214,7 @@ public class QosPolicyChangeListener extends AsyncDataTreeChangeListenerBase<Qos
 
     }
 
+    @Override
     protected void remove(InstanceIdentifier<QosPolicy> identifier, QosPolicy input) {
         LOG.trace("Removing QosPolicy : key: {}, value={}", identifier, input);
         QosNeutronUtils.removeFromQosPolicyCache(input);
@@ -283,6 +284,7 @@ public class QosPolicyChangeListener extends AsyncDataTreeChangeListenerBase<Qos
         }
     }
 
+    @Override
     protected void update(InstanceIdentifier<QosPolicy> identifier, QosPolicy original, QosPolicy update) {
         LOG.trace("Updating QosPolicy : key: {}, original value={}, update value={}", identifier, original, update);
         QosNeutronUtils.addToQosPolicyCache(update);
@@ -351,7 +353,7 @@ public class QosPolicyChangeListener extends AsyncDataTreeChangeListenerBase<Qos
 
     private void supportedQoSRuleTypes() {
         QosRuleTypesBuilder qrtBuilder = new QosRuleTypesBuilder();
-        List<RuleTypes> value = new ArrayList<RuleTypes>();
+        List<RuleTypes> value = new ArrayList<>();
 
         value.add(getRuleTypes("bandwidth_limit_rules"));
         value.add(getRuleTypes("dscp_marking_rules"));