Bug 45461 NPE in JavaAnnotationIterator
I20031023 I noticed this in my log (not sure how I caused it) !ENTRY org.eclipse.ui 4 0 Oct 23, 2003 12:34:09.387 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationIterator.<init> (JavaAnnotationIterator.java:44) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getAnnotation (JavaEditor.java:2842) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateStatusLine (JavaEditor.java:2603) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EditorSelectionChangedListener .selectionChanged(JavaEditor.java:251) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EditorSelectionChangedListener .selectionChanged(JavaEditor.java:244) at org.eclipse.jface.text.TextViewer.firePostSelectionChanged (TextViewer.java:2142) at org.eclipse.jface.text.TextViewer.firePostSelectionChanged (TextViewer.java:2095) at org.eclipse.jface.text.TextViewer$4.run(TextViewer.java:2074) at org.eclipse.swt.widgets.Display.runTimer(Display.java:2215) at org.eclipse.swt.widgets.Display.messageProc(Display.java:1749) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1346) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1861) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1579) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1562) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:765) at org.eclipse.core.launcher.Main.main(Main.java:599)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaAnnotationIterator.java
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.javaeditor;
import java.util.Iterator;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
/**
 * Filters problems based on their types.
 */
public class JavaAnnotationIterator implements Iterator {
			
	private Iterator fIterator;
	private Annotation fNext;
	private boolean fSkipIrrelevants;
	private boolean fReturnAllAnnotations;
	
	/**
	 * Equivalent to <code>JavaAnnotationIterator(model, skipIrrelevants, false)</code>.
	 */
	public JavaAnnotationIterator(IAnnotationModel model, boolean skipIrrelevants) {
		this(model, skipIrrelevants, false);
	}