-
Bug
-
Resolution: Fixed
-
P4
-
1.4.2, 5.0u27, 6u4, 6u5, 6u10, 7, 8, 9, 10
-
b07
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204673 | 8-pool | Vaibhav Choudhary | P4 | Resolved | Fixed |
Snip of Jim's e-mail.
Jim wrote:
here is what I found for setting different float vals
into each primitive type:
1.2345 1234.1 70000.1
bool exc exc exc
byte no exc exc exc
char no exc no exc exc
short no exc no exc exc
int exc exc exc
long exc exc exc
So:
- bool is handled ok
- byte, char, short are handled ok with your interpretation that
just losing precision is ok
- int and long seem to be broken. There should be no exceptions
in any of the above for int and long, shoult there?
Jim wrote:
here is what I found for setting different float vals
into each primitive type:
1.2345 1234.1 70000.1
bool exc exc exc
byte no exc exc exc
char no exc no exc exc
short no exc no exc exc
int exc exc exc
long exc exc exc
So:
- bool is handled ok
- byte, char, short are handled ok with your interpretation that
just losing precision is ok
- int and long seem to be broken. There should be no exceptions
in any of the above for int and long, shoult there?
- backported by
-
JDK-8204673 Assigning float value to int and long throws invalid type exception.
- Resolved