Bug 120144 [implementation] NPE in MethodExitsFinder
20051209 The method exit finder doesn't like return statements in initialziers. public class A { { return 1; } } java.lang.NullPointerException at org.eclipse.jdt.internal.ui.search.MethodExitsFinder.markReferences(MethodExitsFinder.java:99) at org.eclipse.jdt.internal.ui.search.MethodExitsFinder.perform(MethodExitsFinder.java:89) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:2866) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$6.selectionChanged(JavaEditor.java:2932) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:173) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MethodExitsFinder.java
Statement last= (Statement)statements.get(statements.size() - 1);
				int maxVariableId= LocalVariableIndex.perform(fMethodDeclaration);
				FlowContext flowContext= new FlowContext(0, maxVariableId + 1);
				flowContext.setConsiderAccessMode(false);
				flowContext.setComputeMode(FlowContext.ARGUMENTS);
				InOutFlowAnalyzer flowAnalyzer= new InOutFlowAnalyzer(flowContext);
				FlowInfo info= flowAnalyzer.perform(new ASTNode[] {last});
				if (!info.isNoReturn() && !isVoid) {
					if (!info.isPartialReturn())
						return;
				}
			}
			SimpleName name= fAST.newSimpleName("x"); 
			name.setSourceRange(fMethodDeclaration.getStartPosition() + fMethodDeclaration.getLength() - 1, 1);
			fResult.add(name);
		}
	}
	public boolean visit(TypeDeclaration node) {
		
		return false;
	}
	public boolean visit(AnonymousClassDeclaration node) {
		
		return false;
	}
	public boolean visit(AnnotationTypeDeclaration node) {
		
		return false;
	}
	public boolean visit(EnumDeclaration node) {