26 lines
695 B
Plaintext
26 lines
695 B
Plaintext
=== on 1 Oct 2014, 11:39:51 Nicolas Peru wrote:
|
|
Sub task for RSPEC-1764 with updated description for Java, please review.
|
|
|
|
=== on 1 Oct 2014, 11:44:49 Ann Campbell wrote:
|
|
\[~nicolas.peru] I question retaining this noncompliant example:
|
|
|
|
----
|
|
if (5 / 5) { // always 1
|
|
doV();
|
|
}
|
|
----
|
|
|
|
In C, >=1 evaluates to true & 0 evaluates to false. Is it that the same holds true in Java but it's just considered very bad form? If so, then why eliminate this one:
|
|
|
|
----
|
|
if (5 - 5) { // always 0
|
|
do_u();
|
|
}
|
|
----
|
|
?
|
|
|
|
|
|
Also, we have a different rule that yells at people for using equality operators with floating-point numbers, so the first exception is doubly confusing
|
|
|
|
include::../comments-and-links.adoc[]
|