summaryrefslogtreecommitdiffstats
path: root/jtosca
diff options
context:
space:
mode:
Diffstat (limited to 'jtosca')
-rw-r--r--jtosca/pom.xml8
-rw-r--r--jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java4
-rw-r--r--jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java29
3 files changed, 20 insertions, 21 deletions
diff --git a/jtosca/pom.xml b/jtosca/pom.xml
index 6122858..847579c 100644
--- a/jtosca/pom.xml
+++ b/jtosca/pom.xml
@@ -5,11 +5,11 @@
<parent>
<groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
<artifactId>sdc-main-distribution-client</artifactId>
- <version>1.1.8-SNAPSHOT</version>
+ <version>1.1.9-SNAPSHOT</version>
</parent>
<artifactId>jtosca</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
<dependencies>
@@ -27,12 +27,12 @@
<version>1.7.25</version>
</dependency>
- <dependency>
+ <!-- <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
<scope>test</scope>
- </dependency>
+ </dependency> -->
</dependencies>
</project> \ No newline at end of file
diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
index 8b7abce..942ca96 100644
--- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
+++ b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
@@ -101,7 +101,7 @@ public class ToscaTemplate extends Object {
//long startTime = System.nanoTime();
- ExceptionCollector.start();
+ //ExceptionCollector.start();
isFile = aFile;
inputPath = null;
@@ -184,7 +184,7 @@ public class ToscaTemplate extends Object {
csarTempDir = null;
}
- ExceptionCollector.stop();
+ //ExceptionCollector.stop();
verifyTemplate();
}
diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java
index 9bef6bc..07dabf8 100644
--- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java
+++ b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java
@@ -1,45 +1,44 @@
package org.openecomp.sdc.toscaparser.api.common;
-import org.openecomp.sdc.toscaparser.api.elements.EntityType;
+import java.util.ArrayList;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.ArrayList;
-
// Perfectly good enough...
public class ExceptionCollector {
private static Logger log = LoggerFactory.getLogger(ExceptionCollector.class.getName());
- private static boolean isCollecting = false;
- private static ArrayList<String> exceptionStrings = null;
- private static ArrayList<String> traceStrings = null;
+ //private static boolean isCollecting = false;
+ private static ArrayList<String> exceptionStrings = new ArrayList<>();
+ private static ArrayList<String> traceStrings = new ArrayList<>();
private static boolean bWantTrace = true;
- public static void start() {
+ /*public static void start() {
if(exceptionStrings == null) {
exceptionStrings = new ArrayList<String>();
traceStrings = new ArrayList<String>();
}
isCollecting = true;
- }
+ }*/
- public static void stop() {
+ /*public static void stop() {
isCollecting = false;
- }
+ }*/
public static void clear() {
- exceptionStrings = null;
- traceStrings = null;
+ exceptionStrings = new ArrayList<>();
+ traceStrings = new ArrayList<>();
}
public static void appendException(String strExc) { // throws Exception {
- if(!isCollecting) {
+ /*if(!isCollecting) {
// throw new Exception("Can't append exception " + strExc);
log.error("ExceptionCollector - appendException - Can't append exception {}", strExc);
- }
+ }*/
if(!exceptionStrings.contains(strExc)) {
exceptionStrings.add(strExc);
@@ -66,7 +65,7 @@ public class ExceptionCollector {
}
return report;
}
- return null;
+ return new ArrayList<>();
}
public static int errorsCaught() {