Bug 108203 - [1.5][compiler] cannot compile internal class implementing interface with parameterized method
Summary: [1.5][compiler] cannot compile internal class implementing interface with par...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1.1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-27 17:57 EDT by Garret Wilson CLA
Modified: 2005-09-26 11:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Garret Wilson CLA 2005-08-27 17:57:47 EDT
I have the following internal class:

public interface ValueRepresentationStrategy<V>
{
  public <N extends V> Component<?> createComponent(final TreeModel model, final
TreeNodeModel<N> treeNode, final boolean editable, final boolean selected, final
boolean focused);
}

The following internal class in the same file will not compile, even though it
compiles under JDK 1.5.0_04:

public static class TestValueRepresentationStrategy implements
ValueRepresentationStrategy<LabelModel>
{
  public <N extends LabelModel> Component<?> createComponent(final TreeModel
model, final TreeNodeModel<N> treeNode, final boolean editable, final boolean
selected, final boolean focused)
  {
    return null;
  }
}

Changing the class to the following allows it to compile:

public interface ValueRepresentationStrategy<V>
{
  public Component<?> createComponent(final TreeModel model, final
TreeNodeModel<V> treeNode, final boolean editable, final boolean selected, final
boolean focused);
}
Comment 1 Kent Johnson CLA 2005-09-19 13:29:50 EDT
fixed & released in 3.1.1 stream
Comment 2 Kent Johnson CLA 2005-09-19 13:31:19 EDT
Added MethodVerify test069
Comment 3 Garret Wilson CLA 2005-09-19 13:36:07 EDT
What about the next 3.2 milestone---will this fix be included, or is it only
being applied to the 3.1.x stream?
Comment 4 Kent Johnson CLA 2005-09-19 14:54:36 EDT
released in 3.2 HEAD stream
Comment 5 Maxime Daniel CLA 2005-09-21 10:37:34 EDT
Verified for 3.2 M2 with build I20050920-0010.
Comment 6 Olivier Thomann CLA 2005-09-26 11:24:26 EDT
Verified for 3.1.1 using M20050923-1430.
Comment 7 Olivier Thomann CLA 2005-09-26 11:24:39 EDT
Reopen to close as VERIFIED.
Comment 8 Olivier Thomann CLA 2005-09-26 11:24:49 EDT
Fixed.
Comment 9 Olivier Thomann CLA 2005-09-26 11:24:58 EDT
Verified for 3.1.1 using M20050923-1430.