Update Booleans.java #46

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@martinschaef

I'm testing a static analysis tool and it claims that computing x % 1 is always zero.

Update Booleans.java
I'm testing a static analysis tool and it claims that computing x % 1 is always zero.
@pzellera

This comment has been minimized.

Show comment
Hide comment
@pzellera

pzellera Sep 20, 2014

Anything mod 1 will always = 0, what is your goal here?

Anything mod 1 will always = 0, what is your goal here?

@martinschaef

This comment has been minimized.

Show comment
Hide comment
@martinschaef

martinschaef Sep 20, 2014

It is a trivial computation. Is the procedure supposed to return always true (because identityDistribution.next() % 1 == 0 is trivially true)? If so, please ignore this request. But it looks like it should return either true or false depending on identityDistribution.next(). In that case, %1 should be %2.

It is a trivial computation. Is the procedure supposed to return always true (because identityDistribution.next() % 1 == 0 is trivially true)? If so, please ignore this request. But it looks like it should return either true or false depending on identityDistribution.next(). In that case, %1 should be %2.

@JeremiahDJordan

This comment has been minimized.

Show comment
Hide comment
@JeremiahDJordan

JeremiahDJordan Oct 1, 2014

Contributor

We do not use pull requests for Apache Cassandra. Please open a JIRA (https://issues.apache.org/jira/browse/CASSANDRA) if you have a bug to fix and close this request.

Contributor

JeremiahDJordan commented Oct 1, 2014

We do not use pull requests for Apache Cassandra. Please open a JIRA (https://issues.apache.org/jira/browse/CASSANDRA) if you have a bug to fix and close this request.

@martinschaef

This comment has been minimized.

Show comment
Hide comment
@martinschaef

martinschaef Oct 3, 2014

Its only this one line, so I'm probably not going through that jira trouble. Just look at https://github.com/apache/cassandra/pull/46/files and you'll see that "% 2" instead of "% 1" would make a lot more sense.

Its only this one line, so I'm probably not going through that jira trouble. Just look at https://github.com/apache/cassandra/pull/46/files and you'll see that "% 2" instead of "% 1" would make a lot more sense.

josh-mckenzie pushed a commit to josh-mckenzie/cassandra that referenced this pull request May 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment