Query module BadCheckOdd

name
Bad parity check
description
Code that uses ‘x % 2 == 1’ or ‘x % 2 > 0’ to check whether a number is odd does not work for negative numbers.
kind
problem
problem.severity
warning
precision
low
id
java/incomplete-parity-check
tags
reliability correctness types

Imports

Collections
java

Provides all default Java QL imports.

Predicates