This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
FYI:EventListenerList text fix for 1.5 code
- From: Audrius Meskauskas <audriusa at bluewin dot ch>
- To: _PATHES Mauve <mauve-patches at sourceware dot org>
- Date: Tue, 02 Jan 2007 14:54:56 +0100
- Subject: FYI:EventListenerList text fix for 1.5 code
With generics, we need to cast the class instance into abstract java class:
ell.add( (Class) L.class, new L2());
Otherwise the 1.5 java compiler detects the incorrect parameters already
at runtime! I think, the test should compile, because we are testing the
library and not the compiler. The modified test compiles and passes both
with Suns and ours implementation.
2007-01-02 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* gnu/testlet/javax/swing/event/EventListenerList/add.java:
Cast L.class into Class.
Index: add.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/event/EventListenerList/add.java,v
retrieving revision 1.2
diff -u -r1.2 add.java
--- add.java 27 Dec 2006 15:48:18 -0000 1.2
+++ add.java 2 Jan 2007 13:48:24 -0000
@@ -124,7 +124,7 @@
caught = null;
try
{
- ell.add(L.class, new L2());
+ ell.add( (Class) L.class, new L2());
}
catch (Exception ex)
{