Project: Eclipse_Platform_UI
Bug 92291 [Commands] Util.compare uses toString()
Reported: 2005-04-21 16:48:51 | Status: verified fixed

build I20050420-1200 Noticed that Util.compare(Object, Object) compares the toString()s of the args. This could be very inefficient (not to mention inaccurate). The only callers are: org.eclipse.ui.commands.HandlerSubmission.compareTo(Object) (3 matches) org.eclipse.ui.contexts.EnabledSubmission.compareTo(Object) (2 matches) where they compare site objects. Not sure why it's necessary to do this. There's no well-defined order between site objects.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java