Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 20245 invoked from network); 28 Aug 2006 12:49:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 12:49:19 -0000 Received: (qmail 93363 invoked by uid 500); 28 Aug 2006 12:49:17 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 93311 invoked by uid 500); 28 Aug 2006 12:49:17 -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 93300 invoked by uid 99); 28 Aug 2006 12:49:17 -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 05:49:17 -0700 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_IN_SORBS_WEB,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.155 is neither permitted nor denied by domain of smallsmallorgan@gmail.com) Received: from [202.81.18.155] (HELO ausmtp06.au.ibm.com) (202.81.18.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 05:49:16 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp06.au.ibm.com (8.13.6/8.13.6) with ESMTP id k7SCoDP39089190 for ; Mon, 28 Aug 2006 22:50:14 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.250.244]) by sd0208e0.au.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k7SCqAnA233206 for ; Mon, 28 Aug 2006 22:52:15 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k7SCmkKC005550 for ; Mon, 28 Aug 2006 22:48:46 +1000 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av03.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k7SCmjKn005534 for ; Mon, 28 Aug 2006 22:48:45 +1000 Received: from [9.125.7.118] ([9.125.7.118]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006082820484385-7964 ; Mon, 28 Aug 2006 20:48:43 +0800 Message-ID: <44F2E627.6060509@gmail.com> Date: Mon, 28 Aug 2006 20:48:39 +0800 From: Spark Shen User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) 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> <44F2C985.2010905@interia.pl> In-Reply-To: <44F2C985.2010905@interia.pl> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 28/08/2006 20:48:44, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 28/08/2006 20:48:45 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Krzysztof Sobolewski =E5=86=99=E9=81=93: > Spark Shen wrote: > > =20 >>> 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 >>> =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. >> =20 > > That's odd. I used a compiler this time and could not reproduce it (with > javac 1.5.0=5F08-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? :) > =20 Did you (refer to thread [app] ant with ecj) put Eclipse compiler JAR on Ant's execution classpath to execute the javac task. If so, may be that's why=20 It always gives you "unchecked cast" warning, no errors. Best regards > =20 >> And I did not find a way to suppress the unchecked warning while >> compilation succeed. >> =20 > > Maybe @SuppressWarnings("unchecked")? If you're absolutely sure it's OK... > > BTW: > EnumSet set =3D (EnumSet)collection; > seems to compile fine, but I'm not sure it's enough for you :) > > =20 >>> [1] I guess this is in addAll() or its friends? >>> =20 >>> =20 >> I guess 'its friends' refers to removeAll, containsAll, and retainAll. >> :-) But all its friends have different signature as addAll >> >> boolean addAll(*Collection* c) >> boolean containsAll(*Collection* c) >> boolean removeAll(*Collection* c) >> boolean retainAll(*Collection* c) >> I guess you know why they are different. >> >> So, in the implementation of all its friends, same problem is not >> encountered. >> =20 > > Oh, yeah... Who'd remember all that... ;) > -KS > > =20 --=20 Spark Shen China Software Development Lab, IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org