From 8f2b611dcb3554717478017597c97746b8aba7f9 Mon Sep 17 00:00:00 2001 From: vasraz Date: Wed, 16 Jun 2021 13:53:58 +0100 Subject: Fix CRITICAL xxe (XML External Entity) issues Signed-off-by: Vasyl Razinkov Change-Id: Ic33527d54a5245430e41b5a4261810922f7b4fb1 Issue-ID: SDC-3608 --- .../sdc/asdctool/impl/GraphMLDataAnalyzerTest.java | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'asdctool/src/test/java/org') diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/GraphMLDataAnalyzerTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/GraphMLDataAnalyzerTest.java index c2a8a561d8..a3cb9ddfad 100644 --- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/GraphMLDataAnalyzerTest.java +++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/impl/GraphMLDataAnalyzerTest.java @@ -20,37 +20,37 @@ package org.openecomp.sdc.asdctool.impl; -import org.junit.Test; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.openecomp.sdc.asdctool.impl.GraphMLDataAnalyzer.EXCEL_EXTENSION; import static org.openecomp.sdc.asdctool.impl.GraphMLDataAnalyzer.GRAPH_ML_EXTENSION; -public class GraphMLDataAnalyzerTest { +import org.junit.jupiter.api.Test; + +class GraphMLDataAnalyzerTest { - public static final String FILE_NAME = "export"; + private static final String FILE_NAME = "export"; @Test - public void testAnalyzeGraphMLDataNoFile() { - String[] args = new String[]{"noExistFile"}; + void testAnalyzeGraphMLDataNoFile() { + final String[] args = new String[]{"noExistFile"}; // default test - GraphMLDataAnalyzer graph = new GraphMLDataAnalyzer(); - String result = graph.analyzeGraphMLData(args); + final GraphMLDataAnalyzer graph = new GraphMLDataAnalyzer(); + final String result = graph.analyzeGraphMLData(args); assertNull(result); } @Test - public void testAnalyzeGraphMLData() { - String path = getClass().getClassLoader().getResource(FILE_NAME + GRAPH_ML_EXTENSION).getPath(); - String[] args = new String[]{path}; + void testAnalyzeGraphMLData() { + final String path = getClass().getClassLoader().getResource(FILE_NAME + GRAPH_ML_EXTENSION).getPath(); + final String[] args = new String[]{path}; // default test - GraphMLDataAnalyzer graph = new GraphMLDataAnalyzer(); - String result = graph.analyzeGraphMLData(args); + final GraphMLDataAnalyzer graph = new GraphMLDataAnalyzer(); + final String result = graph.analyzeGraphMLData(args); assertNotNull(result); assertTrue(result.endsWith(EXCEL_EXTENSION)); -- cgit 1.2.3-korg