Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 65865 invoked from network); 28 Aug 2006 10:47:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 10:47:26 -0000 Received: (qmail 35481 invoked by uid 500); 28 Aug 2006 10:47:13 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 35436 invoked by uid 500); 28 Aug 2006 10:47:13 -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 35401 invoked by uid 99); 28 Aug 2006 10:47:13 -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 03:47:13 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=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 03:47:11 -0700 Received: by smtp4.poczta.interia.pl (INTERIA.PL, from userid 502) id 1BC02D1C92; Mon, 28 Aug 2006 12:46:48 +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 B5753D1C6D for ; Mon, 28 Aug 2006 12:46:47 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id 1515F3CC68; Mon, 28 Aug 2006 12:46:47 +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 1A03C3CD8E for ; Mon, 28 Aug 2006 12:46:43 +0200 (CEST) Message-ID: <44F2C985.2010905@interia.pl> Date: Mon, 28 Aug 2006 12:46:29 +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> <44F2BA8A.3050204@interia.pl> <44F2BF63.30501@gmail.com> In-Reply-To: <44F2BF63.30501@gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig39B24D371C6E34844893567A" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------enig39B24D371C6E34844893567A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Spark Shen wrote: >> As far as I understand generics, SomeClass and SomeClass, where = B >> extends A, *are* incompatible (per the spec). Generic types are not >> polymorphic. >> The problematic line IMO should read: >> >> EnumSet set =3D (EnumSet)collection; >> =20 > Do you mean to change the problematic line into the above statement? I > have tried this already, but this type of cast will also give a > compilation error. That's odd. I used a compiler this time and could not reproduce it (with javac 1.5.0_08-b03 and quick-and-dirty from-the-scratch EnumSet impl). It= always gives me "unchecked cast" warning, no errors. Maybe I should check= out Harmony sources? :) > And I did not find a way to suppress the unchecked warning while > compilation succeed. Maybe @SuppressWarnings("unchecked")? If you're absolutely sure it's OK..= =2E BTW: EnumSet set =3D (EnumSet)collection; seems to compile fine, but I'm not sure it's enough for you :) >> [1] I guess this is in addAll() or its friends? >> =20 > I guess 'its friends' refers to removeAll, containsAll, and retainAll. > :-) But all its friends have different signature as addAll >=20 > boolean addAll(*Collection* c) > boolean containsAll(*Collection* c) > boolean removeAll(*Collection* c) > boolean retainAll(*Collection* c) > I guess you know why they are different. >=20 > So, in the implementation of all its friends, same problem is not > encountered. Oh, yeah... Who'd remember all that... ;) -KS --------------enig39B24D371C6E34844893567A 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 iD8DBQFE8smFy0fq9RM+TxgRArDPAKCLXVDAHulZNnFAqmmy0O6NbGsL5wCfehWC GbMQi3WRhjBj8h441Dqh13U= =fR1Q -----END PGP SIGNATURE----- --------------enig39B24D371C6E34844893567A--