This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 142165 - Code completion ignores overridden fields
Summary: Code completion ignores overridden fields
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-29 23:22 UTC by malfunction84
Modified: 2012-06-15 06:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description malfunction84 2008-07-29 23:22:59 UTC
When utilizing code-completion of Javadoc, the type of the field displayed does not match the actual type of the field
if a field of the same name (and different type) exists in a superclass.

public class TestParent {
    public static final String TEST = null;
}

/**
 * {@link #| (* code completion invoked *)
+----------------------------------------+
| # TEST                          String |
+----------------------------------------+
 */
public class TestChild extends TestParent {
    public static final Object[] TEST = null;
}

Note that the type is listed as String (the type of a similarly-named static field in the superclass) when it is really
of type Object[].  This may also be the case for type resolution of non-static fields.
Comment 1 Ralph Ruijs 2012-06-13 08:43:15 UTC
The problem seems to be in java code completion, as this also happens with "normal" code completion and javadoc is reusing it.
Comment 2 Dusan Balek 2012-06-13 14:36:04 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/7d12368fb6a0
Comment 3 Quality Engineering 2012-06-15 06:13:54 UTC
Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7d12368fb6a0
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #142165: Code completion ignores overridden fields - fixed.