Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8048020

Regression on java.util.logging.FileHandler

    XMLWordPrintable

Details

    • 8
    • b23
    • x86_64
    • windows_7
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :
        1.8.0_b123

        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 x64

        A DESCRIPTION OF THE PROBLEM :
        The change

        http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/ac22a52a732c

        causes a regression.

        The parameter "append" in the constructor

        public FileHandler(String pattern, int limit, int count, boolean append)

        doesn't work anymore. Every time, a java program a new File is generated (when using %u in Filename), instead of appending to the existing one.


        REGRESSION. Last worked in version 7u60

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        package javaapplication23;

        import java.io.IOException;
        import java.util.logging.FileHandler;

        public class JavaApplication23 {

            public static void main(String[] args) throws IOException {
                new FileHandler("./test_%g_%u.log", 10000, 100, true);
            }

        }


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Only the file test_0_0.log (and .lck) should be generated.
        ACTUAL -
        With every program start, a new file is generated (test_0_1.log, test_0_2.log, ...)

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        package javaapplication23;

        import java.io.IOException;
        import java.util.logging.FileHandler;

        public class JavaApplication23 {

            public static void main(String[] args) throws IOException {
                new FileHandler("./test_%g_%u.log", 10000, 100, true);
            }

        }

        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        not known

        Attachments

          Issue Links

            Activity

              People

                dfuchs Daniel Fuchs
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: