We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigDecimal
float
As of now, the processor for S2164 is incomplete because of the following case:
S2164
float a = 16777216.0f; float b = 1.0f; - float c = a + b; // Noncompliant, yields 1.6777216E7 not 1.6777217E7 + float c = (double) a + (double) b;
See #570 for more details.
However, it can be made fully-fixable if we convert float to java.math.BigDecimal and cast one of the operands to BigDecimal as well.
java.math.BigDecimal
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As of now, the processor for
S2164
is incomplete because of the following case:However, it can be made fully-fixable if we convert
float
tojava.math.BigDecimal
and cast one of the operands toBigDecimal
as well.The text was updated successfully, but these errors were encountered: