Bug 28152 IAE when opening editor
Build 20021210 + plugin export 20021211 Got the following IAE when trying to open an editor. java.lang.IllegalArgumentException at org.eclipse.core.runtime.Preferences.setValue(Preferences.java:1164) at org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore.setValue (AbstractUIPlugin.java:455) at org.eclipse.jdt.ui.JavaElementSorter$Cache.getOffsets (JavaElementSorter.java:122) at org.eclipse.jdt.ui.JavaElementSorter$Cache.getIndex (JavaElementSorter.java:111) at org.eclipse.jdt.ui.JavaElementSorter.getMemberCategory (JavaElementSorter.java:99) at org.eclipse.jdt.ui.JavaElementSorter.category (JavaElementSorter.java:205) at org.eclipse.jdt.ui.JavaElementSorter.compare (JavaElementSorter.java:247) at org.eclipse.jface.viewers.ViewerSorter$1.compare (ViewerSorter.java:163) at java.util.Arrays.mergeSort(Arrays.java:1181) at java.util.Arrays.sort(Arrays.java:1128) at org.eclipse.jface.viewers.ViewerSorter.sort(ViewerSorter.java:161) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren (StructuredViewer.java:447) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren (AbstractTreeViewer.java:250) at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand (AbstractTreeViewer.java:734) at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget (AbstractTreeViewer.java:1141) at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget (StructuredViewer.java:933) at org.eclipse.jface.viewers.StructuredViewer.setSelection (StructuredViewer.java:898) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage.select (JavaOutlinePage.java:1008) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.synchronizeOutlineP ageSelection(CompilationUnitEditor.java:1951) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$OutlinePageSelectionUpdater.ru n(JavaEditor.java:166) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:31) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:94) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1669) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1414) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1403) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1386) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
return OTHERS;
	}
	/*
	 * @see ViewerSorter#compare
	 */
	public int compare(Viewer viewer, Object e1, Object e2) {
		int cat1= category(e1);
		int cat2= category(e2);
		if (cat1 != cat2)
			return cat1 - cat2;	
		
		if (cat1 == PACKAGEFRAGMENTROOTS) {
			IPackageFragmentRoot root1= JavaModelUtil.getPackageFragmentRoot((IJavaElement)e1);
			IPackageFragmentRoot root2= JavaModelUtil.getPackageFragmentRoot((IJavaElement)e2);
			if (!root1.getPath().equals(root2.getPath())) {
				int p1= getClassPathIndex(root1);
				int p2= getClassPathIndex(root2);
				if (p1 != p2) {
					return p1 - p2;
				}
			}
		}
		
		if (cat1 == RESOURCES || cat1 == RESOURCEFOLDERS || cat1 == STORAGE || cat1 == OTHERS) {
			return compareWithLabelProvider(viewer, e1, e2);
		}
		
		String name1= ((IJavaElement) e1).getElementName();
		String name2= ((IJavaElement) e2).getElementName();