Bug 108203

Summary: [1.5][compiler] cannot compile internal class implementing interface with parameterized method
Product: [Eclipse Project] JDT Reporter: Garret Wilson <garret>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.2   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.