You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/05/06 07:12:10 UTC

[GitHub] [logging-log4j2] vy commented on a change in pull request #491: Fix windows build master

vy commented on a change in pull request #491:
URL: https://github.com/apache/logging-log4j2/pull/491#discussion_r627141733



##########
File path: log4j-layout-template-json/src/test/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutNullEventDelimiterTest.java
##########
@@ -71,13 +71,24 @@ public void test() throws Exception {
             // Verify the received log events.
             final byte[] actualBytes = server.getReceivedBytes();
             Assertions.assertThat(actualBytes).startsWith(expectedBytes);
-
-        } catch (BindException bindException) {
-            System.err.println("Required port " + PORT + " not available, skipping " + getClass().getSimpleName());
+        } finally {
+            tempConfig.delete();
         }
 
     }
 
+    public void makeTempConfig(final int serverPort, final File tempConfigFile) throws IOException {

Review comment:
       This approach looks way better, thanks @perry2of5! Would you use `final` modifier on variables, wherever possible, please?




-- 
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