Removing jackson to mitigate cve-2017-4995
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / driver / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / nokia / spring / Conditions.java
index 0554cbe..d27f4be 100644 (file)
 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.spring;
 
 import com.google.common.collect.Sets;
+import java.util.HashSet;
+import java.util.Set;
 import org.springframework.context.annotation.Condition;
 import org.springframework.context.annotation.ConditionContext;
 import org.springframework.core.type.AnnotatedTypeMetadata;
 
-import java.util.HashSet;
-import java.util.Set;
-
 import static com.google.common.collect.Sets.newHashSet;
 
 /**
  * Collects the possibilities of sources
  */
 public class Conditions {
-
     private static final String USE_DIRECT_INTEGRATION = "direct";
 
-    private static Set<Condition> getAllSources() {
-        return newHashSet(new UseForVfc(), new UseForDirect());
+    private Conditions() {
+        //use static way
     }
 
     /**
      * Represents the condition for using VF-C
      */
     public static class UseForVfc implements Condition {
+        private static Set<Condition> getAllSources() {
+            return newHashSet(new UseForVfc(), new UseForDirect());
+        }
+
         @Override
         public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
             boolean anyOtherSourceAvailable = false;
-            for (Condition condition : Conditions.getAllSources()) {
+            for (Condition condition : UseForVfc.getAllSources()) {
                 if (!(condition instanceof UseForVfc) && condition.matches(conditionContext, annotatedTypeMetadata)) {
                     anyOtherSourceAvailable = true;
                 }