S3518 FP Zero Should not be a possible denominator

Please provide

  • Windows
  • SonarLint plugin version:
  • Java
  • Not Connected

The code below SonarLint indicates that INDEX_FACTOR_UP is implied to be zero. It is not.
public class Test
private static final double INDEX_FACTOR_UP = .95;

public Test()
	int index = 5;
	int cacheEnd = 1;
        (int)((index - cacheEnd)/INDEX_FACTOR_UP)), 6);


Hey there.

Thanks for the report. It looks like the same case as here!

And the ticket should make it into a release soon. SONARJAVA-4592