Project: JDT
Bug 171797 improve FilteredItemsSelectionDialog.ItemsFilter.equalsFilter(ItemsFilter)
Reported: 2007-01-26 09:18:18 | Status: verified fixed

I20070123-1715 The Javadoc of FilteredItemsSelectionDialog.ItemsFilter#equalsFilter(ItemsFilter) does not tell how this method is used. It should - tell whether the method is symmetric like Object#equals(..) - or even better: tell that subclasses of FilteredItemsSelectionDialog can be sure that the arguments to equalsFilter(ItemsFilter) are only filters returned from their createFilter() method (=> clients can avoid instanceof checks then) Furthermore, current implementations of that method are questionable: - FilteredItemsSelectionDialog.ItemsFilter.equalsFilter(ItemsFilter) checks for "iFilter != null", although the constract does not allow iFilter to be null - FilteredResourcesSelectionDialog.ResourceFilter.equalsFilter(ItemsFilter) and FilteredTypesSelectionDialog.TypeItemsFilter.equalsFilter(ItemsFilter) call "super.equals(iFilter)". Should be "super.equalsFilter(iFilter)"

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java