-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b91
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b85)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b85, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux localhost.localdomain 2.6.15-1.1833_FC4 #1 Wed Mar 1 23:41:37 EST 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The method Window.setIconImages() was added in b85
as a fix of bug 6339074 but the method was wrongly parametrized.
The fix is to use a bound wilcard here :
public void setIconImages(List<Image> icons)
should be
public void setIconImages(List<? extends Image> icons)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
this code doesn't compile :
Window window=null;
List<BufferedImage> list=null;
window.setIconImages(list);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the code above should compile.
ACTUAL -
it doesn't compile.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
make a copy of the list :
Window window=null;
List<BufferedImage> list=null;
List<Image> list2=new ArrayList<Image>(list);
window.setIconImages(list2);
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b85)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b85, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux localhost.localdomain 2.6.15-1.1833_FC4 #1 Wed Mar 1 23:41:37 EST 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The method Window.setIconImages() was added in b85
as a fix of bug 6339074 but the method was wrongly parametrized.
The fix is to use a bound wilcard here :
public void setIconImages(List<Image> icons)
should be
public void setIconImages(List<? extends Image> icons)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
this code doesn't compile :
Window window=null;
List<BufferedImage> list=null;
window.setIconImages(list);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the code above should compile.
ACTUAL -
it doesn't compile.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
make a copy of the list :
Window window=null;
List<BufferedImage> list=null;
List<Image> list2=new ArrayList<Image>(list);
window.setIconImages(list2);