aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2020-06-22 12:55:04 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-24 15:21:17 +0000
commitb95aa52a9f57ec6c4d53376fc59c749621f541f9 (patch)
tree1fc5dae67703222cd70d0f5399cdb194f9ce4aef /catalog-be/src/main/java
parent16fe29ac226610f79c8da1f691437ec7fe6e79c4 (diff)
Fix for name clash in csar generation
Issue-ID: SDC-3144 Change-Id: Ia9b66bb14bbff3add70eed8dfe41acc55c72b35b Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
index f479bb5c0f..6e3019c0c3 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
@@ -1389,8 +1389,12 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
final String nameWithouNamespacePrefix = nodeTypefullName.substring(nodeTypeNamePrefix.length());
final String[] findTypes = nameWithouNamespacePrefix.split("\\.");
- final String resourceType = findTypes[0];
- return nameWithouNamespacePrefix.substring(resourceType.length());
+
+ if(findTypes.length > 1){
+ final String resourceType = findTypes[0];
+ return nameWithouNamespacePrefix.substring(resourceType.length());
+ }
+ return nameWithouNamespacePrefix;
}
private ImmutablePair<Resource, ActionStatus> createNodeTypeResourceFromYaml(final String yamlName,