From a5e9b0bd743821e0784947ac793453b8943af53c Mon Sep 17 00:00:00 2001 From: timis1 <12120641+timis1@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:43:59 +0200 Subject: [PATCH] JAVA-17765 Cleanup un-committed or un-ignored artifacts - Week 6 - 2023 (#13456) Co-authored-by: timis1 --- .gitignore | 2 ++ .../baeldung/cxf/aegis/BaeldungIntegrationTest.java | 10 +++++++--- jmeter/pom.xml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7b448f6cb0..5dc7abec6a 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,8 @@ ethereum/logs/ jmeter/src/main/resources/*-JMeter.csv jmeter/src/main/resources/*-Basic*.csv jmeter/src/main/resources/*-JMeter*.csv +jmeter/src/main/resources/*ReportsDashboard*.csv +jmeter/src/main/resources/dashboard/*ReportsDashboard*.csv ninja/devDb.mv.db diff --git a/apache-cxf-modules/cxf-aegis/src/test/java/com/baeldung/cxf/aegis/BaeldungIntegrationTest.java b/apache-cxf-modules/cxf-aegis/src/test/java/com/baeldung/cxf/aegis/BaeldungIntegrationTest.java index b28b987cfa..9c89d769e0 100644 --- a/apache-cxf-modules/cxf-aegis/src/test/java/com/baeldung/cxf/aegis/BaeldungIntegrationTest.java +++ b/apache-cxf-modules/cxf-aegis/src/test/java/com/baeldung/cxf/aegis/BaeldungIntegrationTest.java @@ -80,16 +80,20 @@ public class BaeldungIntegrationTest { private void marshalCourseRepo(CourseRepo courseRepo) throws Exception { AegisWriter writer = context.createXMLStreamWriter(); AegisType aegisType = context.getTypeMapping().getType(CourseRepo.class); - XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(fileName)); + final FileOutputStream stream = new FileOutputStream(fileName); + XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(stream); writer.write(courseRepo, new QName("http://aegis.cxf.baeldung.com", "baeldung"), false, xmlWriter, aegisType); xmlWriter.close(); + stream.close(); } private CourseRepo unmarshalCourseRepo() throws Exception { AegisReader reader = context.createXMLStreamReader(); - XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(fileName)); + final FileInputStream stream = new FileInputStream(fileName); + XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(stream); CourseRepo courseRepo = (CourseRepo) reader.read(xmlReader, context.getTypeMapping().getType(CourseRepo.class)); xmlReader.close(); + stream.close(); return courseRepo; } @@ -97,7 +101,7 @@ public class BaeldungIntegrationTest { public void cleanup(){ File testFile = new File(fileName); if (testFile.exists()) { - testFile.delete(); + testFile.deleteOnExit(); } } } \ No newline at end of file diff --git a/jmeter/pom.xml b/jmeter/pom.xml index c4d09b9106..acd823b74f 100644 --- a/jmeter/pom.xml +++ b/jmeter/pom.xml @@ -136,7 +136,7 @@ ${project.basedir}/src/main/resources/dashboard true true - false + true