NeatGuyCoding commented on code in PR #4008:
URL: https://github.com/apache/logging-log4j2/pull/4008#discussion_r2652652349


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java:
##########
@@ -174,8 +174,10 @@ public static RollingRandomAccessFileManager 
getRollingRandomAccessFileManager(
                             long size = 0;
                             long time = System.currentTimeMillis();
                             RandomAccessFile raf = null;
+                            boolean fileExistedBefore = false;

Review Comment:
   no, it should be re-evaluate to make sure time is not based on the one 
deleted



##########
log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManagerTest.java:
##########
@@ -333,4 +334,40 @@ void testRolloverRetainsFileAttributes() throws Exception {
                 .permissions();
         assertEquals(filePermissions, actualFilePermissions);
     }
+
+    @Test
+    void testWriteHeaderWhenFileDoesNotExistBefore() throws IOException {

Review Comment:
   fix
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to