yegor256/qulice

Constants should be on the right side of comparison

Open

#716 aberto em 16 de fev. de 2016

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)Java (122 forks)github user discovery
bughelp wantedpostponed

Métricas do repositório

Stars
 (320 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

When comparing variables with constants there are two possible approaches: if (null == variable) or if (variable == null)

Let's enforce the second one, so that constant value (string literal, null or number) is on the right side of comparison.

Guia do colaborador