aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-08-07 10:19:02 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-07 10:19:02 +0000
commit976626d62ae4f55f9d9f0e96bc954102dd38e726 (patch)
tree881b58240dd6add92d01ac140f89c305fa0cda06 /catalog-model/src
parent3b1119ca51ea0de0ff28b76b916fa8b0cba54fcf (diff)
parentb2c60183d5d654b945a24ec5564807e4f691c6e8 (diff)
Merge "[SDC] code sync"
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ArtifactsOperations.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverter.java1
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java16
3 files changed, 18 insertions, 1 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ArtifactsOperations.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ArtifactsOperations.java
index b8d8cb39de..07c2f8d51c 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ArtifactsOperations.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/ArtifactsOperations.java
@@ -269,6 +269,8 @@ public class ArtifactsOperations extends BaseOperation {
} else {
updateVersionAndDate(artifactData, oldVesrion);
}
+ long time = System.currentTimeMillis();
+ artifactData.setHeatParamsUpdateDate(time);
break;
case HEAT:
case HEAT_NET:
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverter.java
index c8fac11b3a..3f2b6eabf7 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverter.java
@@ -45,7 +45,6 @@ public class HeatStringConverter implements PropertyValueConverter {
coverted = ValidationUtils.normaliseWhitespace(coverted);
coverted = ValidationUtils.stripOctets(coverted);
coverted = ValidationUtils.removeHtmlTagsOnly(coverted);
- coverted = coverted.replaceAll("\"", "").replaceAll("\'", "");
}
return coverted;
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java
new file mode 100644
index 0000000000..285dd9a965
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/HeatStringConverterTest.java
@@ -0,0 +1,16 @@
+package org.openecomp.sdc.be.model.tosca.converters;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class HeatStringConverterTest {
+
+ @Test
+ public void convertString_strWithQuotes_returnStringAsIs() {
+ String str = "'i'm string with \"quote\"'";
+ String convert = HeatStringConverter.getInstance().convert(str, null, null);
+ assertEquals(str, convert);
+ }
+
+}