Bug 178394 NPE in marker adapter buildAll markers
This shows up occasionally in the test suite logs. Probably happening during shutdown !STACK 0 java.lang.NullPointerException at org.eclipse.ui.views.markers.internal.MarkerAdapter.buildAllMarkers(MarkerAdapter.java:262) at org.eclipse.ui.views.markers.internal.MarkerView.updateForContentsRefresh(MarkerView.java:570) at org.eclipse.ui.views.markers.internal.MarkerView$MarkerProcessJob.run(MarkerView.java:151) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java
* @param start
	 *            the start index in the markers
	 * @param end
	 *            the last index to check
	 * @param sortIndex -
	 *            the parent of the field
	 * @param parent
	 * @return MarkerCategory[] or <code>null</code> if we are at the bottom
	 *         of the tree
	 */
	MarkerCategory[] buildHierarchy(MarkerList markers, int start, int end,
			int sortIndex) {
		CategoryComparator sorter = getCategorySorter();
		if (sortIndex > 0) {
			return null;
		}
		Collection categories = new ArrayList();
		Object previous = null;
		int categoryStart = start;
		Object[] elements = markers.getArray();
		for (int i = start; i <= end; i++) {
			if (previous != null) {
				
				if (sorter.compare(previous, elements[i], sortIndex, false) != 0) {
					categories.add(new MarkerCategory(this, categoryStart,
							i - 1, getNameForIndex(markers, categoryStart)));
					categoryStart = i;
				}
			}
			previous = elements[i];