Query module MissedTernaryOpportunity

name
Missed ternary opportunity
description
An ‘if’ statement where both branches either (a) return or (b) write to the same variable can often be expressed more clearly using the ‘?’ operator.
kind
problem
problem.severity
recommendation
precision
low
id
java/missed-ternary-operator
tags
maintainability language-features

Imports

java

Provides all default Java QL imports.

Predicates