Bug 520990 - NullPointerException in MessageSend.analyseCode(...)
Summary: NullPointerException in MessageSend.analyseCode(...)
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-15 13:14 EDT by Ivan Ivan CLA
Modified: 2022-07-24 13:25 EDT (History)
1 user (show)

See Also:


Attachments
Sources which occur the bug (2.25 KB, application/octet-stream)
2017-08-15 13:14 EDT, Ivan Ivan CLA
no flags Details
Use it to build ASTs (2.71 KB, application/octet-stream)
2017-08-15 13:15 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 2017-08-15 13:14:30 EDT
Created attachment 269857 [details]
Sources which occur the bug

Error:
Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:141)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:125)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:739)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:263)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:118)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:873)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1006)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:630)
	at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:993)
	at test.Main2.main(Main2.java:56)
Comment 1 Ivan Ivan CLA 2017-08-15 13:15:26 EDT
Created attachment 269858 [details]
Use it to build ASTs
Comment 2 Stephan Herrmann CLA 2017-08-15 14:43:28 EDT
We fixed several similar exceptions over time :-/


I can reproduce using that attached sources.

Before the crash several compile errors are reported, one of them being:

----------
1. ERROR in /tmp/JDT_Bug/ru/mail/mailbox/cmd/server/TornadoUploadRequest.java (at line 4)
        public class TornadoUploadRequest extends NetworkCommand<Params> {
                                                                 ^^^^^^
Params cannot be resolved to a type
----------

If I add an empty interface Params, then the NPE no longer occurs.

Does this correspond to your observation, or do you see NPE also in error-free code?
Comment 3 Ivan Ivan CLA 2017-08-15 14:46:28 EDT
No, I don't see. When I change Params to Void, NPE is no longer appears
Comment 4 Stephan Herrmann CLA 2017-08-20 06:27:13 EDT
Thanks for confirming.

Will need to protect against unresolved type anyway, tentatively scheduling for 4.8.
Comment 5 Manoj N Palat CLA 2018-05-17 03:26:08 EDT
bulk move out of 4.8
Comment 6 Ivan Ivan CLA 2019-04-17 07:40:48 EDT
Hi, any changes? Doesn't seem to be fixed, but last comment was more than a year ago
Comment 7 Eclipse Genie CLA 2022-07-24 13:25:43 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.