Skip to content

I20201002-1800

@carstenartur carstenartur tagged this 02 Oct 19:28
in org.eclipse.jdt.internal.corext.refactoring.generics.InferTypeArgumentsConstraintsSolver.getNonTaggingInterfaces(ArrayList)

This method compares two Boolean values using the == or != operator.
Normally, there are only two Boolean values (Boolean.TRUE and
Boolean.FALSE), but it is possible to create other Boolean objects using
the new Boolean(b) constructor. It is best to avoid such objects, but if
they do exist, then checking Boolean objects for equality using == or !=
will give results than are different than you would get using
.equals(...).

Rank: Of Concern (16), confidence: Normal
Pattern: RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN
Type: RC, Category: BAD_PRACTICE (Bad practice)

Change-Id: I269131632762186d6375d8935f2815ba02292636
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Assets 2
Loading