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 80333 - Find Usages does not find constructors with generic type
Summary: Find Usages does not find constructors with generic type
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: PC Solaris
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords: RELNOTE
Depends on:
Blocks:
 
Reported: 2006-07-14 19:26 UTC by Nathan Fiedler
Modified: 2007-04-03 18:02 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 Nathan Fiedler 2006-07-14 19:26:31 UTC
Take for example these two abbreviated files (they are found in the
xml/schema/schemaui module on release55 branch of NB CVS, for the sake of
reproducing the problem):

CategorizedChildren.java:

    public CategorizedChildren(SchemaUIContext context, 
            SchemaComponentReference<C> reference) {
        this(context,reference,null);
    }

    public CategorizedChildren(SchemaUIContext context, 
            SchemaComponentReference<C> reference, 
            List<Class<? extends SchemaComponent>> childFilters) {
        ....
    }

CategorizedSchemaNodeFactory.java:

    public <C extends SchemaComponent> Children createChildren(
            Node parent, SchemaComponentReference<C> reference) {
        return new CategorizedChildren<C>(getContext(), reference,
                getChildFilters());
    }

Say I invoke Find Usages on the second constructor of CategorizedChildren (the
one with three parameters). The results include only the other constructor, and
do not include the usage in CategorizedSchemaNodeFactory.

Now say I remove the "<C>" from CategorizedSchemaNodeFactory and re-run the Find
Usages -- this time it finds the usage in CategorizedSchemaNodeFactory.

It seems to me that this is a bug, the <C> in CSNF should not matter one way or
the other, it is a valid usage of the constructor in any case.
Comment 1 Jan Becicka 2006-12-15 18:41:06 UTC
Fixed together with issue 80365