aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java10
1 files changed, 7 insertions, 3 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 efbaaa61db..82f7c32524 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
@@ -5106,11 +5106,15 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
actualVfName = vfResourceName;
actualType = nodeResourceType;
}
-
+ String nameWithouNamespacePrefix;
try {
StringBuilder toscaResourceName = new StringBuilder(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX);
- String nameWithouNamespacePrefix = nodeTypeFullName
+ if (!nodeTypeFullName.contains(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX)){
+ nameWithouNamespacePrefix = nodeTypeFullName;
+ } else {
+ nameWithouNamespacePrefix = nodeTypeFullName
.substring(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX.length());
+ }
String[] findTypes = nameWithouNamespacePrefix.split("\\.");
String resourceType = findTypes[0];
String actualName = nameWithouNamespacePrefix.substring(resourceType.length());
@@ -5181,4 +5185,4 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
return super.shouldUpgradeToLatestDerived(clonedComponent);
}
}
-} \ No newline at end of file
+}