| Summary: | NPE when inspecting scrapbook expression that uses Java 8 features | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Thorsten Möller <thorstenmoeller> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED MOVED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | loskutov, manoj.palat, sarika.sinha |
| Version: | 4.19 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | stalebug | ||
The example actually doesn't work. This one works but causes the same error:
return java.time.format.DateTimeFormatter
.ofPattern("yyyyMMddHHmmss.SSS000")
.format(java.time.format.DateTimeFormatter.ofPattern("dd.MM.yyyy HHmmss").parse("30.03.2021 112430", java.time.LocalDateTime::from));
@Manoj, I see that this.descriptor is null in this scenario. If I add a != null check it proceeds and lands up to another NPE: Exception in thread "Thread-19" java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.FunctionalExpression$1BridgeCollector.<init>(FunctionalExpression.java:331) Any suggestion ? 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. As of today, using Eclipse 2023-03 (4.27.0), this error still exists. I have just tried the line again and still get the exact same exception: Internal compiler error: java.lang.NullPointerException: Cannot read field "parameters" because "this.descriptor" is null at org.eclipse.jdt.internal.compiler.ast.ReferenceExpression.analyseCode(ReferenceExpression.java:516) (In reply to Thorsten Möller from comment #4) > As of today, using Eclipse 2023-03 (4.27.0), this error still exists. I have > just tried the line again and still get the exact same exception: > > Internal compiler error: java.lang.NullPointerException: Cannot read field > "parameters" because "this.descriptor" is null at > org.eclipse.jdt.internal.compiler.ast.ReferenceExpression. > analyseCode(ReferenceExpression.java:516) The project bug tracker moved to github: https://github.com/eclipse-jdt/eclipse.jdt.core/issues If you are interested in the fix, please report bug there. |
From time to time, I'm using Eclipse's scrapbook pages (*.jpage). Today I tried to inspect the following expression: return java.time.format.DateTimeFormatter .ofPattern("yyyyMMddHHmmss.SSS000") .format(java.time.format.DateTimeFormatter.ofPattern("dd.MM.yyyy").parse("30.03.2021", java.time.LocalDateTime::from)); This results in the following error: Internal compiler error: java.lang.NullPointerException: Cannot read field "parameters" because "this.descriptor" is null at org.eclipse.jdt.internal.compiler.ast.ReferenceExpression.analyseCode(ReferenceExpression.java:516)