java.lang.String#contentEquals(CharSequence) suboptimal? (original) (raw)

Alexander Veit alexander.veit at gmx.net
Mon Jan 4 15:15:19 UTC 2010


Hi,

it seems that

if (cs.equals(this)) return true;

should be replaced with

if (cs instanceof String) return cs.equals(this);

or completely left out.

Does anyone agree?

-- Cheers, Alex



More information about the core-libs-dev mailing list