Query module ContainerSizeCmpZero

name
Container size compared to zero
description
Comparing the size of a container to zero with this operator will always return the same value.
kind
problem
problem.severity
warning
precision
very-high
id
java/test-for-negative-container-size
tags
reliability correctness logic

Imports

Collections
Maps
java

Provides all default Java QL imports.

Classes

ArrayLengthRead

A read access to the length field of an array.

CollectionSizeCall

An access to Collection.size().

IntegralZeroLiteral
MapSizeCall

An access to Map.size().

SizeOfContainer

A union of the possible kinds of container size calls.

StringLengthRead

An access to String.length().