-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
x86
-
linux
Name: rmT116609 Date: 07/25/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux SztT 2.4.21-openmosix-1 #4 Wed Jul 23 21:12:47 CEST 2003 i686 unknown
EXTRA RELEVANT SYSTEM CONFIGURATION :
does not have influence on bug
A DESCRIPTION OF THE PROBLEM :
Code which correctly compiled in 1.4 and previous does no longer compile if generics are enabled.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Take class presented below and try to compile in 1.4 (or with -source 1.4) and with generics enabled in 1.5.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
correct compilation
ACTUAL -
BuggyTable.java:1: name clash: setDefaultRenderer(java.lang.Class,javax.swing.table.TableCellRenderer) in BuggyTable and setDefaultRenderer(java.lang.Class<?>,javax.swing.table.TableCellRenderer) in javax.swing.JTable have the same erasure, yet neither overrides the other
public class BuggyTable extends javax.swing.JTable
ERROR MESSAGES/STACK TRACES THAT OCCUR :
see above
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class BuggyTable extends javax.swing.JTable
{
public void setDefaultRenderer(Class columnClass,
javax.swing.table.TableCellRenderer renderer)
{
if (renderer!=null)
{
throw new RuntimeException("Opps, I should put meanfull code here");
}else
super.setDefaultRenderer(columnClass,null);
};
};
---------- END SOURCE ----------
Release Regression From : 1.4.2_04
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 287035)
======================================================================
- duplicates
-
JDK-5073079 Allow unchecked override of generified methods in parameterless classes
-
- Resolved
-