JDK-4916563 : new wildcard subst scheme breaks java.lang.ref
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2003-09-03
  • Updated: 2004-04-21
  • Resolved: 2004-04-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0Resolved
Related Reports
Duplicate :  
Description
The new subst scheme breaks an idiom used in java.lang.ref.  An isolated test case follows.  This is perfectly typesafe, yet rejected, with

enqueue(? extends Ref<? extends java.lang.Object>) in Q<? super T> cannot be applied to (Ref<T>)
        this.queue.enqueue(this);
        ^ 



class Q<T> {
    void enqueue(Ref<? extends T> r) {
    }
}

class Ref<T> {
    Q<? super T> queue;

    void enqueue() {
        this.queue.enqueue(this);
    }
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b49 tiger-beta2
14-06-2004

WORK AROUND Remove the type parameters on the declaration of queue, using a raw type instead. Yecch.
11-06-2004

PUBLIC COMMENTS ...
10-06-2004

EVALUATION It would be very desireable to get this addressed for Tiger. ###@###.### 2003-09-05 see also http://forum.java.sun.com/thread.jsp?forum=316&thread=495786 ###@###.### 2004-02-25 see also http://forum.java.sun.com/thread.jsp?forum=316&thread=503188 ###@###.### 2004-03-15
25-02-2004