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

Wrong rounding mode in DecimalFormat after deserialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7
    • core-libs
    • b61
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.7.0_07"
      Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
      Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      If a DecimalFormat with a rounding mode other than HALF_EVEN is serialized and again deserialized, the rounding mode in the format itself is still the old one,
      but the rounding mode which is used is located in the digitList, and that is reset to the initial value HALF_EVEN.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Build a DecimalFormat with a rounding mode other than HALF_EVEN.
      Serialize and again deserialize this format.
      After deserialization, the rounding mode in the format itself is still the old one,
      but the rounding mode which is used is located in the digitList, and that is reset to the initial value HALF_EVEN.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      After deserialization, also the runding mode in the digitList shall be the same.
      ACTUAL -
      After deserialization, the rounding mode in the format itself is still the old one,
      but the rounding mode which is used is located in the digitList, and that is reset to the initial value HALF_EVEN.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            peytoia Yuka Kamiya (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: