Thinkofname / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
1 stars 0 forks source link

Double.POSITIVE_INFINITY applied to float fields #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a 'bean' class with a primitive float field
2. Set to Float.POSITIVE_INFINITY
3. Convert to YAML, create new object from YAML text

What is the expected output? What do you see instead?

An object with the float field set to Float.POSITIVE_INFINITY
Instead, we get a type exception because the system attempted to set the field 
value to Double.POSITIVE_INFINITY.

What version of SnakeYAML are you using? On what Java version?

1.13

Please provide any additional information below. (Often a failing test is
the best way to describe the problem.)

Original issue reported on code.google.com by darren.j...@gmail.com on 31 Oct 2013 at 4:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Java version was 1.7

Original comment by darren.j...@gmail.com on 31 Oct 2013 at 5:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I will have a look.

Original comment by py4fun@gmail.com on 31 Oct 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Dear Darren,
I tried to apply your changes but I failed (lots of test failures)

Please send ALL your changes as one patch. (and check that all the tests 
succeed)

Original comment by py4fun@gmail.com on 1 Nov 2013 at 11:52

GoogleCodeExporter commented 9 years ago
Ok, working from the trunk:  
Here is a less-intrusive solution that comes with a test, and does not 
interfere with the success of any of your existing tests.

Original comment by darren.j...@gmail.com on 4 Nov 2013 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
Applied. Please have a look.

Original comment by py4fun@gmail.com on 7 Nov 2013 at 6:02

GoogleCodeExporter commented 9 years ago
Looks good, thanks.

Original comment by darren.j...@gmail.com on 8 Nov 2013 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by py4fun@gmail.com on 3 Apr 2014 at 4:44