You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/04/16 21:07:11 UTC

[GitHub] [maven-shared-utils] elharo commented on a change in pull request #11: [SUREFIRE-1556] fail fast on empty element names

elharo commented on a change in pull request #11:
URL: https://github.com/apache/maven-shared-utils/pull/11#discussion_r399339268



##########
File path: src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java
##########
@@ -40,26 +37,24 @@
  */
 public class PrettyPrintXmlWriterTest
 {
-    StringWriter w;
+    private StringWriter w = new StringWriter();;
 
-    PrettyPrintXMLWriter writer;
+    private PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter( w );
 
-    @Before
-    public void before()
-            throws Exception
-    {
-        w = new StringWriter();
-        writer = new PrettyPrintXMLWriter( w );
-    }
-
-    @After
-    public void after()
-            throws Exception
+    
+    @Test

Review comment:
       This works and it follows the recommendation of the JUnit Wiki and the design of JUnit from 4.13 onward. I'd like to move ahead with fixing this bug. Can I get an approval for this?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org