int index1 = itemOne - 1; if (!(0 <= index1 && index1 < items.length)) return OS.noErr; int index2 = itemTwo - 1; if (!(0 <= index2 && index2 < items.length)) return OS.noErr;
if (!(0 < itemOne && itemOne <= items.length)) return OS.noErr; if (!(0 < itemTwo && itemTwo <= items.length)) return OS.noErr; TreeItem item1 = items [itemOne - 1]; TreeItem item2 = items [itemTwo - 1]; if (item1 == null || item2 == null) return OS.noErr; int index1 = _indexOf (item1.parentItem, item1); int index2 = _indexOf (item2.parentItem , item2);
int itemCompareProc (int browser, int itemOne, int itemTwo, int sortProperty) {	int index1 = itemOne - 1;	if (!(0 <= index1 && index1 < items.length)) return OS.noErr;	int index2 = itemTwo - 1;	if (!(0 <= index2 && index2 < items.length)) return OS.noErr;	if (sortDirection == SWT.DOWN && sortColumn != null) {		return items [index1].index > items [index2].index ? 1 : 0;	}	return items [index1].index < items [index2].index ? 1 : 0;}