X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=restapi-call-node%2Fprovider%2Fsrc%2Ftest%2Fjava%2Fjtest%2Forg%2Fonap%2Fccsdk%2Fsli%2Fplugins%2Frestapicall%2FTestXmlParser.java;h=544d259e0123b4a442a50927f7440d6834d54541;hb=9042880234791fbe2e0ef033091ba93cb7f088f5;hp=6d506ccec02a672c943b06c2a670ce247dc2c06f;hpb=0c7f2223a42ae9f1a9ac8954e9b9194e929b72f6;p=ccsdk%2Fsli%2Fplugins.git diff --git a/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestXmlParser.java b/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestXmlParser.java index 6d506cce..544d259e 100644 --- a/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestXmlParser.java +++ b/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestXmlParser.java @@ -37,39 +37,41 @@ import org.slf4j.LoggerFactory; public class TestXmlParser { - private static final Logger log = LoggerFactory.getLogger(TestXmlParser.class); + private static final Logger log = LoggerFactory.getLogger(TestXmlParser.class); - @Test - public void test() throws Exception { - BufferedReader in = new BufferedReader(new InputStreamReader(ClassLoader.getSystemResourceAsStream("test3.xml"))); - String ss = ""; - String line = null; - while ((line = in.readLine()) != null) - ss += line + '\n'; + @Test + public void test() throws Exception { + BufferedReader in = new BufferedReader( + new InputStreamReader(ClassLoader.getSystemResourceAsStream("test3.xml")) + ); + String ss = ""; + String line = null; + while ((line = in.readLine()) != null) + ss += line + '\n'; - Set listNameList = new HashSet(); - listNameList.add("project.dependencies.dependency"); - listNameList.add("project.build.plugins.plugin"); - listNameList.add("project.build.plugins.plugin.executions.execution"); - listNameList.add("project.build.pluginManagement.plugins.plugin"); - listNameList.add( - "project.build.pluginManagement.plugins.plugin.configuration.lifecycleMappingMetadata.pluginExecutions.pluginExecution"); + Set listNameList = new HashSet(); + listNameList.add("project.dependencies.dependency"); + listNameList.add("project.build.plugins.plugin"); + listNameList.add("project.build.plugins.plugin.executions.execution"); + listNameList.add("project.build.pluginManagement.plugins.plugin"); + listNameList.add("project.build.pluginManagement." + + "plugins.plugin.configuration.lifecycleMappingMetadata.pluginExecutions.pluginExecution"); - Map mm = XmlParser.convertToProperties(ss, listNameList); + Map mm = XmlParser.convertToProperties(ss, listNameList); - logProperties(mm); + logProperties(mm); - in.close(); - } + in.close(); + } - private void logProperties(Map mm) { - List ll = new ArrayList<>(); - for (Object o : mm.keySet()) - ll.add((String) o); - Collections.sort(ll); + private void logProperties(Map mm) { + List ll = new ArrayList<>(); + for (Object o : mm.keySet()) + ll.add((String) o); + Collections.sort(ll); - log.info("Properties:"); - for (String name : ll) - log.info("--- " + name + ": " + mm.get(name)); - } + log.info("Properties:"); + for (String name : ll) + log.info("--- " + name + ": " + mm.get(name)); + } }