Ticket #3961 (assigned defect)

SVN Diffs for #3961

 

Opened 4 years ago

Last modified 5 months ago

DecimalFormat.setCurrency leaves object in inconsistent state

Reported by: mark.davis(at)us.ibm.com Assigned to: mark (accepted)
Priority: major Milestone: 4.2
Component: formatting Version:
Keywords: Cc:
Load: Xref: 4985
Java Version: Operating System: all
Project (C/J): ICU4C,ICU4J and ICU4JNI Weeks: 0.1
Review:

Description (Last modified by grhoten)

It sets the currency, but doesn't reset the DecimalFormatSymbols, thus leaving the object inconsistent. To test, create two DecimalFormats that are identical except for the currency strings in DecimalFormatSymbols. Call setCurrency on both with a currency, then test equals().

Attachments

Change History

12/31/69 17:37:39 changed by notes2

Added reference to 4985, which is in the same code. Deborah

12/31/69 17:37:40 changed by auditor

  • Added reference to 4985, which is in the same code. Deborah
  • ",
  • Thu Aug 24 14:25:05 2006 grhoten changed notes2: target: "3.6" to "3.8",

07/18/04 21:36:16 changed by Mark Edward Davis <mark.davis(at)jtcsv.com>

I looked into this more, and it turns out that the currency symbols in the DateFormatSymbols are ignored now; the fields are just there for backwards compatibility. So the better fix is to change DateFormatSymbols.equals() to ignore those symbols, and to document that clearly.

09/17/07 10:46:07 changed by mark

  • load changed.
  • status changed from new to assigned.
  • java changed.
  • revw changed.

10/03/07 23:38:01 changed by grhoten

  • keywords deleted.
  • description changed.
  • milestone changed from 3.8 to UNSCH.

10/03/07 23:38:17 changed by grhoten

  • cc deleted.

03/21/08 10:28:46 changed by mark

  • milestone changed from UNSCH to 4.0.

07/07/08 12:40:01 changed by srl

  • milestone changed from 4.0 to 4.2.

Add/Change #3961 (DecimalFormat.setCurrency leaves object in inconsistent state)




Anti spam check: