Bug 136292 [Markers] problems view: NPE after delete
20060412-0010 Not sure if this is reproducable, but when I deleted a project, I got the following exception. The problem view was grouped by 'Type' at that moment. !ENTRY org.eclipse.ui.ide 4 4 2006-04-12 10:13:35.483 !MESSAGE Marker id: 4684521 not found. !STACK 1 org.eclipse.core.internal.resources.ResourceException: Marker id: 4684521 not found. at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:56) at org.eclipse.core.internal.resources.Marker.getType(Marker.java:194) at org.eclipse.ui.views.markers.internal.Util.getMarkerTypeName(Util.java:380) at org.eclipse.ui.views.markers.internal.FieldCategory.getValue(FieldCategory.java:61) at org.eclipse.ui.views.markers.internal.FieldCategory.compare(FieldCategory.java:88) at org.eclipse.ui.views.markers.internal.CategorySorter.compare(CategorySorter.java:58) at org.eclipse.ui.views.markers.internal.CategorySorter.compare(CategorySorter.java:72) at org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:184) at java.util.Arrays.mergeSort(Arrays.java:1284) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.sort(Arrays.java:1223) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:182) at org.eclipse.ui.views.markers.internal.MarkerAdapter.buildAllMarkers(MarkerAdapter.java:251) at org.eclipse.ui.views.markers.internal.MarkerView.updateForContentsRefresh(MarkerView.java:544) at org.eclipse.ui.views.markers.internal.MarkerView$MarkerProcessJob.run(MarkerView.java:148) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) !SUBENTRY 1 org.eclipse.core.resources 4 376 2006-04-12 10:13:35.483 !MESSAGE Marker id: 4684521 not found. !ENTRY org.eclipse.core.jobs 4 2 2006-04-12 10:13:35.573 !MESSAGE An internal error occurred during: "Process resource updates". !STACK 0 java.lang.NullPointerException at java.lang.String.compareTo(String.java) at org.eclipse.ui.views.markers.internal.FieldCategory.compare(FieldCategory.java:88) at org.eclipse.ui.views.markers.internal.CategorySorter.compare(CategorySorter.java:58) at org.eclipse.ui.views.markers.internal.CategorySorter.compare(CategorySorter.java:72) at org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:184) at java.util.Arrays.mergeSort(Arrays.java:1284) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.sort(Arrays.java:1223) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:182) at org.eclipse.ui.views.markers.internal.MarkerAdapter.buildAllMarkers(MarkerAdapter.java:251) at org.eclipse.ui.views.markers.internal.MarkerView.updateForContentsRefresh(MarkerView.java:544) at org.eclipse.ui.views.markers.internal.MarkerView$MarkerProcessJob.run(MarkerView.java:148) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/Util.java
*     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.ui.views.markers.internal;
import com.ibm.icu.text.DateFormat;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.views.markers.MarkerViewUtil;
/**
 * The Util class is the class of general utilities used by the marker support.
 * 
 */
public final class Util {
	static String EMPTY_STRING = "";
	static String TWO_LINE_FEED = "\n\n";
	static String LINE_FEED_AND_TAB = "\n\t";
	private static DateFormat format;
	static final MarkerNode[] EMPTY_MARKER_ARRAY = new MarkerNode[0];