Skip to main content

Possible Bug in BigDecimal or BigInteger with serialization

4 replies [Last post]
sbogrett
Offline
Joined: 2004-12-01

We have run across what we consider a very serious problem with jdk1.6.0_14. Prior to jdk1.6.0_14 the following code worked correctly over a period of years. When executed with jdk1.6.0_14 an error is detected when summing the big decimals. This is very reproducible.

We have tried to make the test program easy to use, debug and understand. We will also file a bug in the bug database.

Regards,
Steve

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sbogrett
Offline
Joined: 2004-12-01

I have logged two separate bugs. One with the file I/O and one without.

1514801 with file I/O. This is not the simplest reproducible case.

1514811 with just the reconstruction through BigInteger. This is a simpler case.

Regards,
Steve

ndcosta123
Offline
Joined: 2007-10-03

Hi sbogrett ,

Thanks for providing us with these reports - Both of these will be tracked under bug report 6837951. This report should be visible at in a couple of days -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6837951

Thanks,
Nelson

sbogrett
Offline
Joined: 2004-12-01

Here is a simpler test program that does not do any file I/O. It simply reconstructs the BigDecimal using a BigInteger constructed from the BigInteger returned from unsignedbytes.

Regards,
Steve

ndcosta123
Offline
Joined: 2007-10-03

hi sbogrett ,

Could you post this as a report at http://bugreport.sun.com and provide the incident ID. This looks like a regression and we would like to investigate this further.

Thanks,
Nelson