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 48567 - missed usages of methods called through nested supertypes
Summary: missed usages of methods called through nested supertypes
Status: CLOSED DUPLICATE of bug 48415
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 10:08 UTC by Ondrej Rypacek
Modified: 2007-09-26 09:14 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 Ondrej Rypacek 2004-09-07 10:08:57 UTC
The Find Usages feature fails to find a method
usage through supertype (interface) declared as
nested in a separate file. 
Consider the following example

A.java ---------------

public class A implements Main.Ints { 
    public int ten() { return 10;}          
}

Main.java ------------

public class Main {  
    interface Ints { 
        int ten() ;
    }
    
    public static void main(String[] args) {
        Ints ints = new A();
        System.out.print(ints.ten());
    }
}


Now, when searching of usage of A.ten(), nothing
is returned or just the definiton itself, when
"Find overriding methods" is clicked.

When class A was defined in Main.java (i.e. the
same file as the usage), or A was separate and
interface Ints was also in a separate file, not
nested, the usage was found correctly. 
It doesn't work when the supertype is nested and
the subtype is in a different file (nested or not).
 
I set it as P2 as such a bug disqualifies the
whole feature. When I encountered it, I had quite
a long hard time figuring out how could the
program work if the method was never called. Then
I returned to grep and I'm happy :-)
Comment 1 Tomas Hurka 2004-09-07 14:13:11 UTC
Hmm, I cannot reproduce it. Maybe this is duplicate of issue #48415.
Comment 2 Tomas Hurka 2004-09-10 14:23:39 UTC
Probably duplicate of 48415

*** This issue has been marked as a duplicate of 48415 ***
Comment 3 Marek Grummich 2004-09-13 15:17:39 UTC
The behaviour (3 occurrences) is same in the current trunk build
200409121800 and in the qbuild (beta2) branch. Thus, a fix seemed to
be included to the both code lines.
Comment 4 Jan Chalupa 2004-09-14 10:50:36 UTC
Already included in beta 2. Removing beta2-candidate keyword.
Comment 5 Quality Engineering 2007-09-20 11:59:04 UTC
Reorganization of java component