[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Patch: FYI: fixlet in Class
From: |
Tom Tromey |
Subject: |
[cp-patches] [generics] Patch: FYI: fixlet in Class |
Date: |
07 Aug 2004 12:04:21 -0600 |
I'm checking this in on the generics branch.
This fixes a buglet in the new method Class.asSubClass.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* java/lang/Class.java (asSubClass): Cast `this', not argument.
Index: java/lang/Class.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v
retrieving revision 1.22.2.1
diff -u -r1.22.2.1 Class.java
--- java/lang/Class.java 7 Aug 2004 00:27:06 -0000 1.22.2.1
+++ java/lang/Class.java 7 Aug 2004 17:39:18 -0000
@@ -1251,7 +1251,7 @@
{
if (! klass.isAssignableFrom(this))
throw new ClassCastException();
- return (Class<? extends T>) klass;
+ return (Class<? extends T>) this;
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Patch: FYI: fixlet in Class,
Tom Tromey <=