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

In java.util.logging StreamHandler calls Formatter.format before getHead

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      It is not clear from the specification of StreamHandler that it calls publish on the Formatter before getHead. If the Formatter stores state between calls to getHead and publish (which might be necessary for more complex XML structures than XMLFormatter for example) then the logical assumption that getHead will be called before any call to publish will lead to unexpected results.

      If Formatter is intended to be stateless then this should be made clear in the specification.


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gmanwanisunw Girish Manwani (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: