Bug 270799 - [DOM] NPE in ConstructorDeclaration.analyseCode
Summary: [DOM] NPE in ConstructorDeclaration.analyseCode
Status: VERIFIED DUPLICATE of bug 270446
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-01 10:33 EDT by Ben Vitale CLA
Modified: 2009-04-28 01:36 EDT (History)
2 users (show)

See Also:


Attachments
Error log with stacktrace (25.02 KB, application/octet-stream)
2009-04-01 10:33 EDT, Ben Vitale CLA
no flags Details
Class that causes the error to occur (1.66 KB, application/octet-stream)
2009-04-01 10:35 EDT, Ben Vitale CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Vitale CLA 2009-04-01 10:33:08 EDT
Created attachment 130568 [details]
Error log with stacktrace

Build ID: I20090313-0100

Steps To Reproduce:
1. Created a new class with some @Test methods
2. Selected class name and right-clicked

Expected behavior: Run As -> JUnit Test menu item available.
Actual behavior: Run As sub-menu empty. Errors in the log.

More information:
(I will attach the full stacktrace)

java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.analyseCode(ConstructorDeclaration.java:70)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:684)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:218)
Comment 1 Ben Vitale CLA 2009-04-01 10:35:06 EDT
Created attachment 130569 [details]
Class that causes the error to occur
Comment 2 Olivier Thomann CLA 2009-04-01 11:17:01 EDT
Reproduced with HEAD.
Investigating.

Updated stack trace with HEAD:
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.analyseCode(ConstructorDeclaration.java:70)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:684)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:218)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:666)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:253)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:111)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:868)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:518)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:908)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:657)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.internalIsTest(JUnit4TestFinder.java:232)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.isTest(JUnit4TestFinder.java:200)
at org.eclipse.jdt.internal.junit.util.TestSearchEngine.isTestOrTestSuite(TestSearchEngine.java:58)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.isJUnitTest(JUnitPropertyTester.java:112)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.canLaunchAsJUnitTest(JUnitPropertyTester.java:87)
at org.eclipse.jdt.internal.junit.JUnitPropertyTester.test(JUnitPropertyTester.java:70)
Comment 3 Olivier Thomann CLA 2009-04-01 12:04:12 EDT
Closing a dup of bug 270446.

*** This bug has been marked as a duplicate of bug 270446 ***
Comment 4 Srikanth Sankaran CLA 2009-04-28 01:36:26 EDT
Verified for 3.5M7 using I20090426-2000