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 81856 - "Implements" badge not shown for generics method
Summary: "Implements" badge not shown for generics method
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-03 20:45 UTC by _ gtzabari
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Testcase (1.24 KB, application/octet-stream)
2006-08-04 14:38 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2006-08-03 20:45:26 UTC
dev build 200607291900

Given:

public class Encloser1
{
  public static interface IConfiguration
  {}

  public static interface IConfigurationProvider
  {
    IConfiguration getClass(Class<? extends Encloser1.class>);
  }
}

class Encloser2
{
  public static interface IConfiguration extends Encloser1.IConfigurationProvider
  {}

  public static interface IConfigurationProvider
  {
    IConfiguration getClass(Class<? extends Encloser2.class>);
  }
}

class Configuration implements Encloser2.IConfigurationProvider
{
  public Encloser1.IConfiguration getClass(Class<? extends Encloser1.class>)
  {
    // Netbeans shows an annotation showing this method implements an interface
  }

  public Encloser2.IConfiguration getClass(Class<? extends Encloser2.class>)
  {
    // Netbeans does not add an annotation to indicate that this method
Encloser2.IConfigurationProvider
  }
}

  I suspect there might be a problem to do with Generics erasure. I'd expect
Netbeans to handle this better, by flagging errors if providing public
Encloser2.IConfiguration getClass(Class<? extends Encloser2.class>) is illegal,
otherwise show the "implements" annotation in the UI.
Comment 1 Jiri Prox 2006-08-04 10:09:07 UTC
Can you provide directly the file, please? I've got some syntax error from code
you've posted, and I'd like to test it with exactly the same code as you.
Comment 2 _ gtzabari 2006-08-04 14:38:31 UTC
Created attachment 32542 [details]
Testcase
Comment 3 _ gtzabari 2006-08-04 14:40:10 UTC
I've updated a testcase for this issue which also shows a related bug I have not
discussed before. "Override methods" does not display a Generic abstract method
that the class is required to implement, a compiler error occurs if it is omitted.

Please let me know if you are able to reproduce both on your end.
Comment 4 Jiri Prox 2006-08-04 15:33:17 UTC
Yes, I can confirm both errors.
Comment 5 Jan Becicka 2006-10-26 16:28:14 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 6 Quality Engineering 2007-09-20 09:57:22 UTC
Reorganization of java component