Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] [1.5] JDT 1.5 update available - Cheetah 04



Dear 1.5 fans,

Wildcard type compatibilities got reworked quite significantly. In
particular, it now diagnoses
usage of methods which parameters are of wildcard type (see 59641).

Covariance is still not supported, but the Cheetah can now issue synthetic
bridge methods for
allowing overriding to parameterized methods; and thus allow the following
program to run
and print "SUCCESS".

public class X<T> {
    public static void main(String[] args) {
        X x = new Y();
        System.out.println(x.foo()); /* invoke 'foo()Object' */
    }
   T foo() {return null;} /* generated as 'foo()Object' */
}
class Y extends X<Object> {
    String foo() {return "SUCCESS";} /* generated as 'foo()String' */
    /* Generate extra method to bridge the gap in between 'foo()String' and
'foo()Object'
    Object foo() { return 'foo()String'; }
     */
}

Additionally, the new Cheetah does address the following defects:
59723 [1.5] Compiler rejects usage of ArrayList.toArray(char[][])
59628 [1.5] Erroneous diagnosis for missing abstract method implementation
59641 [1.5] Compiler should refuse usage of wildcard argument values
59147 [1.5] Compiler rejects correct code with wildcards and raw types
58979 [1.5] NullPointerException in compiler

Please retrieve Cheetah04 from our update site, and find more info at:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/r3.0/main.html#updates


A recent integration build is required, since the Cheetah has absorbed the
latest API adjustments
from Eclipse main stream. Therefore, Cheetah04 requires build I20040422 or
better. However, as
noted in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=59542, the
platform update got broken.
Note that this is being repaired, thanks to a patch attached to this
defect. Hopefully, the patch
will be released into a subsequent integration  build.
The safest approach, even after having patched the integration build, is to
manually exit and
restart once more. There are still glitches in the update process, which
may cause grief if
these extra steps were not performed (these also should be resolved in a
near future).
Last but not least, make sure to install Cheetah on a clean integration
build. There also are
some issues in update area which do not seem to accept multiple versions of
the Cheetah to
coexist (though the latest should prevail).

As usual, if you find issues with it (and still, you should <g>), then
please
enter a bug report against JDT Core, where you prefix the problem title
with "[1.5]" so we can easily identify these issues; and please also
mention the version of the Cheetah you are riding (see Eclipse help about
plug-in details: e.g. Eclipse Java Development Tools Core 3.0.0.cheetah04).

We are now looking at covariance support.
The JDT Core team



Back to the top