Summary: | [contentassist] NPE on 'new' assist in lambda in enum field declaration | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Paul Pazderski <paul-eclipse> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | gayanper, stephan.herrmann |
Version: | 4.12 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | stalebug |
Description
Paul Pazderski
2019-05-06 07:53:00 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. still happens on HEAD NPE happens at this line TypeBinding binding = variable.type.resolvedType; variable is the FieldDeclaration "ENUM_VALUE". NPE is no surprise: enum constants are represented by a FieldDeclaration without a .type (because the type is implicitly given as the enclosing enum). fix would be along the lines of TypeBinding binding = ((FieldDeclaration)variable).binding.type; (but that cast is not good of course). Why don't we have "VariableBinding AbstractVariableDeclaration.getVariableBinding()" ? Ups, because TypeParameter extends AbstractVariableDeclaration, and it doesn't have a VariableBinding. Outch. 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. |