diff options
author | Tal Gitelman <tg851x@intl.att.com> | 2017-07-03 20:16:55 +0300 |
---|---|---|
committer | Tal Gitelman <tg851x@intl.att.com> | 2017-07-03 20:16:55 +0300 |
commit | 153a35821f0d25ce23cca467b76c5a7c5092c744 (patch) | |
tree | 0c66c4d1310019479e446ea3a4c26faffb0aa33f /catalog-model/src/main | |
parent | ffdda7d685029d6a88ac82ac637e43bba96423cb (diff) |
[sdc] - last merges before moving to LF
Change-Id: I0df3ec795f0de84229ea4bb4806ec8f959243557
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-model/src/main')
3 files changed, 9 insertions, 13 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java index 407d711ed1..d29f989149 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java @@ -1350,7 +1350,7 @@ public abstract class BaseOperation { } protected String buildGroupInstanceName(String instanceName, String groupName) { - return ValidationUtils.normaliseComponentName(instanceName) + ".." + groupName; + return ValidationUtils.normalizeComponentInstanceName(instanceName) + ".." + groupName; } protected String generateCustomizationUUID() { diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java index bd57689700..d282ecfae9 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java @@ -878,7 +878,7 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI } private String buildGroupInstanceLogicalName(String instanceName, String groupName) { - return instanceName + ".." + groupName; + return ValidationUtils.normalizeComponentInstanceName(instanceName) + ".." + groupName; } /** diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java index d8198dac6b..f3189ee968 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java @@ -109,19 +109,15 @@ public class ToscaListValueConverter extends ToscaValueBaseConverter implements asJsonArray.forEach(e -> { Object convertedValue = null; if (isScalarF) { - String jsonAsString = e.toString(); - log.debug("try to convert scalar value {}", jsonAsString); - if ( jsonAsString == null) { - convertedValue = null; + if (e.isJsonPrimitive()) { + String jsonAsString = e.getAsString(); + log.debug("try to convert scalar value {}", jsonAsString); + convertedValue = innerConverterFinal.convertToToscaValue(jsonAsString, innerType, + dataTypes); } else { - JsonElement singleElement = jsonParser.parse(jsonAsString); - if (singleElement.isJsonPrimitive()) { - convertedValue = innerConverterFinal.convertToToscaValue(jsonAsString, innerType, - dataTypes); - } else { - convertedValue = handleComplexJsonValue(singleElement); - } + convertedValue = handleComplexJsonValue(e); } + } else { JsonObject asJsonObject = e.getAsJsonObject(); Set<Entry<String, JsonElement>> entrySet = asJsonObject.entrySet(); |