Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 56322 invoked from network); 14 Jun 2008 10:56:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2008 10:56:18 -0000 Received: (qmail 94926 invoked by uid 500); 14 Jun 2008 10:56:20 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 94897 invoked by uid 500); 14 Jun 2008 10:56:20 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 94886 invoked by uid 99); 14 Jun 2008 10:56:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 03:56:19 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.24] (HELO gmp-eb-inf-2.sun.com) (192.18.6.24) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 10:55:29 +0000 Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe2.eu.sun.com [192.18.6.11]) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m5EAtUcR027479 for ; Sat, 14 Jun 2008 10:55:41 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K2G00K018U51H00@fe-emea-10.sun.com> (original mail from Kristian.Waagan@Sun.COM) for derby-dev@db.apache.org; Sat, 14 Jun 2008 11:55:30 +0100 (BST) Received: from [129.159.115.210] by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K2G003SO90I9Q80@fe-emea-10.sun.com> for derby-dev@db.apache.org; Sat, 14 Jun 2008 11:55:30 +0100 (BST) Date: Sat, 14 Jun 2008 12:55:31 +0200 From: Kristian Waagan Subject: Re: protocolTest unsafe operations? In-reply-to: Sender: Kristian.Waagan@Sun.COM To: derby-dev@db.apache.org Message-id: <4853A3A3.4090404@Sun.COM> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-Virus-Checked: Checked by ClamAV on apache.org Myrna van Lunteren write: > Hi, > > I see a new 'unchecked or unsafe operations' warning in the build, for > ProtocolTest. > Is this something I should log a bug for, or accept as ok? > Hi Myrna, I don't think it is worth logging a bug for, but I guess we shouldn't accept the warnings either... In my sandbox I have made the warnings go away. I had to rewrite some pre-Java 5.0 code from TestProto to use generics. These changes will go in with other changes to ProtocolTest soon. When we start compiling the Derby sources with source level 1.5, I think we'll get lots of these warnings! As examples, uses of Hashtable, ArrayList, Vector, Map and PrivilegedExceptionAction. There's nothing functionally wrong with the code (hopefully ;) ), but the compiler is unable to verify that all the casts are safe. I don't know what the best way to handle the general issue is; rewrite the old code to use generics, ignore warnings or suppress the warnings? thanks, -- Kristian > Regards, > Myrna > > ------------------------- > .... > pptesting: > > compile: > [mkdir] Created dir: C:\derbyt\svn2\trunk\classes.pptesting > [javac] Compiling 10 source files to C:\derbyt\svn2\trunk\classes.pptesting > [javac] Note: > C:\derbyt\svn2\trunk\java\testing\org\apache\derby\impl\drda\ProtocolTest.java > uses unchecked or unsafe operations. > [javac] Note: Recompile with -Xlint:unchecked for details. > ------------------------- >