Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 45666 invoked from network); 28 Aug 2006 09:43:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 09:43:11 -0000 Received: (qmail 50771 invoked by uid 500); 28 Aug 2006 09:43:09 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 50160 invoked by uid 500); 28 Aug 2006 09:43:07 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 50149 invoked by uid 99); 28 Aug 2006 09:43:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 02:43:07 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jezuch@interia.pl designates 80.48.65.10 as permitted sender) Received: from [80.48.65.10] (HELO smtp4.poczta.interia.pl) (80.48.65.10) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 02:43:07 -0700 Received: by smtp4.poczta.interia.pl (INTERIA.PL, from userid 502) id D00203B06DE; Mon, 28 Aug 2006 11:42:45 +0200 (CEST) Received: from poczta.interia.pl (mi03.poczta.interia.pl [10.217.12.3]) by smtp4.poczta.interia.pl (INTERIA.PL) with ESMTP id 76DF43B06C0 for ; Mon, 28 Aug 2006 11:42:45 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id C8EE43CD66; Mon, 28 Aug 2006 11:42:44 +0200 (CEST) Received: from [81.219.50.251] (unknown [81.219.50.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTP id 9276B3CCE1 for ; Mon, 28 Aug 2006 11:42:39 +0200 (CEST) Message-ID: <44F2BA8A.3050204@interia.pl> Date: Mon, 28 Aug 2006 11:42:34 +0200 From: Krzysztof Sobolewski User-Agent: Thunderbird 1.5.0.5 (X11/20060825) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib] Sun compiler change? References: <002701c6c8a1$db1f0190$0201a8c0@LITTLEGUY> <44F063F8.2000803@gmail.com> <44F06E8B.3010605@gmail.com> <44F27E84.6040103@gmail.com> In-Reply-To: <44F27E84.6040103@gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4FDB443FA7610581AC7CC043" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------enig4FDB443FA7610581AC7CC043 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Spark Shen wrote: > Seems that in new version of JDK, EnumSet and E> (E was previously stated as >) are not considered > compatible. > After changing > EnumSet set =3D (EnumSet)collection; > into > EnumSet set =3D (EnumSet)collection; > , compilation using ant in command line succeeds. =2E..but gives "unsafe" warnings. > Would any one give a clue, why the are considered incompatible in this > version of JDK? Maybe a bugfix? :) As far as I understand generics, SomeClass and SomeClass, where B extends A, *are* incompatible (per the spec). Generic types are not polym= orphic. The problematic line IMO should read: EnumSet set =3D (EnumSet)collection; That's because collection seems to be an EnumSet of some unknown subclass= of E[1] and that connot be safely converted to EnumSet. [1] I guess this is in addAll() or its friends? -KS --------------enig4FDB443FA7610581AC7CC043 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE8rqOy0fq9RM+TxgRAksFAJ9EaB22+5Hh1tqj6FcHEAFp7Ff36gCgrKNx trovZA0acuwS+1++XJcpmh0= =xXY5 -----END PGP SIGNATURE----- --------------enig4FDB443FA7610581AC7CC043--