Bug 567786 - ConditionalExpression.generateCode(...) throws NullPointerException
Summary: ConditionalExpression.generateCode(...) throws NullPointerException
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.18   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact: Manoj N Palat CLA
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-10 16:33 EDT by Ivan Ivan CLA
Modified: 2022-10-25 03:58 EDT (History)
1 user (show)

See Also:


Attachments
Test case (sources which occur the issue) (9.27 KB, application/zip)
2020-10-10 16:33 EDT, Ivan Ivan CLA
no flags Details
Use it to build sources (1.46 KB, application/octet-stream)
2020-10-10 16:34 EDT, Ivan Ivan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Ivan CLA 2020-10-10 16:33:26 EDT
Created attachment 284419 [details]
Test case (sources which occur the issue)

Hello.

I tried to build JDK sources using JDT, but an exception occured:

Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.generateCode(ConditionalExpression.java:290)
	at org.eclipse.jdt.internal.compiler.ast.Statement.generateArguments(Statement.java:444)
	at org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall.generateCode(ExplicitConstructorCall.java:176)
	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.internalGenerateCode(ConstructorDeclaration.java:438)
	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.generateCode(ConstructorDeclaration.java:310)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:742)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:812)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:408)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:913)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1044)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:662)
	at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:1001)

I create a minimal test case and removed all unrelated code.

Sources are attached
Comment 1 Ivan Ivan CLA 2020-10-10 16:34:28 EDT
Created attachment 284420 [details]
Use it to build sources
Comment 2 Manoj N Palat CLA 2020-10-25 22:22:01 EDT
@Ivan: Thanks for the report.
which is the Eclipse version/build id?
Comment 3 Ivan Ivan CLA 2020-10-25 22:56:31 EDT
Hey Manoj,
I always use the latest version from your master branch on GitHub
Comment 4 Eclipse Genie CLA 2022-10-25 03:58:44 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.