summaryrefslogtreecommitdiffstats
path: root/jtosca/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorPavel Aharoni <pa0916@att.com>2017-05-04 20:04:08 +0300
committerPavel Aharoni <pa0916@att.com>2017-05-04 20:04:08 +0300
commitf09c2646860e66de2d91bccd61217ce22abfe75d (patch)
treef181ac6c71ddf9a480ffeb38efa0b4517df19b2b /jtosca/src/main/java/org/openecomp
parent04e7fa443307328986942c66fbcb01693c8f9ccb (diff)
[SDC-15] allotted resource CSAR fixes
Change-Id: I31dcd0a6b697357fed0e7f8c431b5317339b3c74 Signed-off-by: Pavel Aharoni <pa0916@att.com>
Diffstat (limited to 'jtosca/src/main/java/org/openecomp')
-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
2 files changed, 16 insertions, 17 deletions
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() {