org.eclipse.jdt.core.IJavaElement[]'s, (equivalent to ==) in
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.updateInput(IJavaElement[])
and
org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.setInputElements(IJavaElement[])
This method invokes the .equals(Object o) method on an array. Since
arrays do not override the equals method of Object, calling equals on an
array is the same as comparing their addresses. To compare the contents
of the arrays, use java.util.Arrays.equals(Object[], Object[]). To
compare the addresses of the arrays, it would be less confusing to
explicitly check pointer equality using ==.
Rank: Scariest (3), confidence: Normal
Pattern: EC_BAD_ARRAY_COMPARE
Type: EC, Category: CORRECTNESS (Correctness)
Change-Id: I3075ce4e36a525d51f46d8652246525f6523b7a6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>