Sonar Major 53/12353/4
authorSwapnilPathak <SP00494485@techmahindra.com>
Fri, 15 Sep 2017 05:54:06 +0000 (11:24 +0530)
committerSwapnilPathak <SP00494485@techmahindra.com>
Fri, 15 Sep 2017 05:55:24 +0000 (11:25 +0530)
Move the string literal on the left side of this string comparison.

Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab453ae7
Issue-ID: POLICY-230
Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
policy-endpoints/src/main/java/org/onap/policy/drools/event/comm/bus/internal/BusConsumer.java

index c4155b7..8171c35 100644 (file)
@@ -310,7 +310,7 @@ public interface BusConsumer {
           consumerInstance, fetchTimeout, fetchLimit, useHttps);
 
       // super constructor sets servers = {""} if empty to avoid errors when using DME2
-      if ((servers.size() == 1 && servers.get(0).equals("")) || (servers == null)
+      if ((servers.size() == 1 && ("".equals(servers.get(0)))) || (servers == null)
           || (servers.isEmpty())) {
         throw new IllegalArgumentException("Must provide at least one host for HTTP AAF");
       }