36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
=== on 2 Oct 2014, 09:01:20 Nicolas Peru wrote:
|
|
Updated message and description based on : \http://www.ibm.com/developerworks/library/j-jtp0114/#N101EA
|
|
|
|
|
|
Please review.
|
|
|
|
|
|
The trick here is to report a correct error message.
|
|
|
|
I am not sure we should detect indirect equality detection as stated in main description (see previous link).
|
|
|
|
I am also wondering about a recommandation to use BigDecimal.compareTo instead of a float equality.
|
|
|
|
|
|
I think we should definitely detect those float (in)equality but I am really wondering about what we should recommend as a fix for this issue.
|
|
|
|
=== on 3 Oct 2014, 18:51:33 Ann Campbell wrote:
|
|
\[~nicolas.peru] for buggy code code don't always have to suggest a fix since there can be many ways to handle it.
|
|
|
|
|
|
Having finally read some of the reference you provided, I've updated the description to offer 3 courses of action
|
|
|
|
* just don't do it
|
|
* just a Number such as BigDecimal
|
|
* compare vs margin of error
|
|
|
|
Also, I had inadvertently deleted the wrong code sample. Noncompliant code restored to last state (still missing indirect equality tests) and Compliant solution removed.
|
|
|
|
=== on 9 Oct 2014, 08:59:51 Nicolas Peru wrote:
|
|
\[~ann.campbell.2] After mail discussion I updated description, feel free to correct it.
|
|
|
|
=== on 9 Oct 2014, 11:49:16 Ann Campbell wrote:
|
|
\[~nicolas.peru] I've updated the inline comments (and code formatting)
|
|
|
|
include::../comments-and-links.adoc[]
|