Update license header in appc-dg-common files
[appc.git] / appc-dg / appc-dg-shared / appc-dg-common / src / main / java / org / onap / appc / dg / common / impl / VNFResolver.java
index 10d4fff..39ae52d 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP : APPC
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
@@ -18,7 +18,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  * ============LICENSE_END=========================================================
  */
 
@@ -37,29 +36,22 @@ public class VNFResolver extends AbstractResolver {
         return resolve(args[0], args[1], args[2], args[3]);
     }
 
-
-    protected FlowKey resolve(final String action, final String vnfType, final String vnfVersion,
+    private FlowKey resolve(final String action, final String vnfType, final String vnfVersion,
         final String apiVersion) {
-        RankedAttributesContext context = new RankedAttributesContext() {
-            @Override
-            public Object getAttributeValue(String name) {
-                switch (name) {
-                    case "action":
-                        return action;
-                    case "api_version":
-                        return apiVersion;
-                    case "vnf_type":
-                        return vnfType;
-                    case "vnf_version":
-                        return vnfVersion;
-                    default:
-                        throw new IllegalStateException(name);
-                }
+        RankedAttributesContext context = name -> {
+            switch (name) {
+                case "action":
+                    return action;
+                case "api_version":
+                    return apiVersion;
+                case "vnf_type":
+                    return vnfType;
+                case "vnf_version":
+                    return vnfVersion;
+                default:
+                    throw new IllegalStateException(name);
             }
         };
-
-        FlowKey wfKey = resolver("VNF").resolve(context);
-
-        return wfKey;
+        return resolver("VNF").resolve(context);
     }
 }