-
Bug
-
Resolution: Duplicate
-
P4
-
5.0
-
generic
-
generic
This program doesn't compile:
import java.lang.ref.*;
public class CastProb {
public ExtraRef prob(ReferenceQueue<Object> refQ) {
return((ExtraRef)refQ.remove());
}
public static class ExtraRef
extends WeakReference<Object> {
int extraInfo;
public ExtraRef(Object value) {
super(value);
}
}
}
See http://forum.java.sun.com/thread.jspa?threadID=618527
###@###.### 2005-04-18 19:15:37 GMT
import java.lang.ref.*;
public class CastProb {
public ExtraRef prob(ReferenceQueue<Object> refQ) {
return((ExtraRef)refQ.remove());
}
public static class ExtraRef
extends WeakReference<Object> {
int extraInfo;
public ExtraRef(Object value) {
super(value);
}
}
}
See http://forum.java.sun.com/thread.jspa?threadID=618527
###@###.### 2005-04-18 19:15:37 GMT
- duplicates
-
JDK-4916620 legal cast is rejected
- Closed