Bug 35265 NPE in classpath variables page
Build: I-20030317 I was switching back and forth between target platform and classpath variables preference pages, changing values on target platform page and seeing if changes are reflected on classpath variables page. At some point, I got the following null pointer: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.buildpaths.CPVariableElementLabelProvider.ge tImage(CPVariableElementLabelProvider.java:55) at org.eclipse.jface.viewers.TableViewer.doUpdateItem(TableViewer.java:202) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run (StructuredViewer.java:119) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:867) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.jface.viewers.StructuredViewer.updateItem (StructuredViewer.java:1271) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:454) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:431) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:861) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:801) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:859) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:821) at org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField.refresh (ListDialogField.java:739) at org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock.refresh (VariableBlock.java:406) at org.eclipse.jdt.internal.ui.preferences.ClasspathVariablesPreferencePage.setVisi ble(ClasspathVariablesPreferencePage.java:80) at org.eclipse.jface.preference.PreferenceDialog.showPage (PreferenceDialog.java:1064) at org.eclipse.jface.preference.PreferenceDialog$9.run (PreferenceDialog.java:496)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
String[] reservedName= getReservedVariableNames();
		for (int i= 0; i < reservedName.length; i++) {
			CPVariableElement elem= new CPVariableElement(reservedName[i], Path.EMPTY, true);
			elem.setReserved(true);
			fVariablesList.addElement(elem);
		}
	}
	public boolean performOk() {
		ArrayList removedVariables= new ArrayList();
		ArrayList changedVariables= new ArrayList();
		removedVariables.addAll(Arrays.asList(JavaCore.getClasspathVariableNames()));
		
		List changedElements= fVariablesList.getElements();
		for (int i= changedElements.size()-1; i >= 0; i--) {
			CPVariableElement curr= (CPVariableElement) changedElements.get(i);
			if (curr.isReserved()) {
				changedElements.remove(curr);
			} else {
				IPath path= curr.getPath();
				IPath prevPath= JavaCore.getClasspathVariable(curr.getName());
				if (prevPath != null && prevPath.equals(path)) {
					changedElements.remove(curr);
				} else {
					changedVariables.add(curr.getName());
				}
			}
			removedVariables.remove(curr.getName());
		}
		int steps= changedElements.size() + removedVariables.size();
		if (steps > 0) {