Project: JDT
Bug 34067 NPE in ASTREwriter
Reported: 2003-03-07 06:32:06 | Status: resolved fixed

RC2 - load JUnit - change class Assert in the following way - rename both assert methods in assertOld - change compiler to 1.4 - change body of both assertOld methods to use the new assert keyword - select assertOld(String, condition) - Inline method - preview observe: you get the exception below. sed by: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:166) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.rewriteNode(ASTRewriteAnalyzer.java:370) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1173) at org.eclipse.jdt.core.dom.AssertStatement.accept0(AssertStatement.java:84) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:166) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.rewriteParagraph(ASTRewriteAnalyzer.java:527) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1029) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:79) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.doVisit(ASTRewriteAnalyzer.java:166) at org.eclipse.jdt.in

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTRewriteAnalyzer.java