From 51842453b199a7c3a6785f4ab047612d50eab3b9 Mon Sep 17 00:00:00 2001 From: Michael Mokry Date: Fri, 2 Nov 2018 15:08:38 -0500 Subject: Removed Objective From keyword check in parser Modified the Model parser code to allow "objective" as a field name in yaml. Change-Id: Ia3667ebc84a0bbdbbb3723bdcf0237a8f35313ee Issue-ID: POLICY-1244 Signed-off-by: Michael Mokry --- ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ONAP-REST/src') diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java index 54713ceef..f145f4db1 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java @@ -1214,9 +1214,7 @@ public class MSModelUtils { hm = new LinkedHashMap<>(); String keyStr = key.substring(key.lastIndexOf('.') + 1); String valueStr = map.get(key); - if (key.contains(".objective.")) { - throw new ParserException("Attribute objective is a key word. Please use a different name"); - } + if (("type").equals(keyStr)) { if (!key.contains("entry_schema")) { hm.put(keyStr, valueStr); -- cgit 1.2.3-korg