Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 806FED85A for ; Tue, 28 May 2013 09:51:27 +0000 (UTC) Received: (qmail 34017 invoked by uid 500); 28 May 2013 09:51:27 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 33973 invoked by uid 500); 28 May 2013 09:51:25 -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 33543 invoked by uid 99); 28 May 2013 09:51:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 May 2013 09:51:21 +0000 Date: Tue, 28 May 2013 09:51:21 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-5840) Clean up compiler warnings introduced by using Java 5 language features MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5840?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1366= 8214#comment-13668214 ]=20 Knut Anders Hatlen commented on DERBY-5840: ------------------------------------------- I'm not planning any more work on this issue. We currently have three occurrences of @SuppressWarnings("unchecked") in th= e code: - UserType.compare() (unreachable code, I believe, see DERBY-4470) - UserDefinedAggregator.accumulate() - UserDefinedAggregator.merge() All of these warnings happen when some instance of a user-defined class is = cast to a generic interface type (either java.util.Comparable or org.apache= .derby.agg.Aggregator). I don't see any obvious way to prevent these unchec= ked casts, so for now we'll just have to accept that the compiler cannot pr= ove this code to type-safe, and keep the annotations. There are also three occurrences of @SuppressWarnings("deprecation"): - ParameterMappingTest.getXXX() - ParameterMappingTest.setUnicodeStream() - ClientClob.reInitForNonLocator() The deprecation warnings in ParameterMappingTest happen because we test dep= recated JDBC methods. We should test all JDBC methods that Derby implements= , so the right thing to do is to continue calling the deprecated methods an= d suppress the warnings. The code that causes the deprecation warning in ClientClob is only used whe= n the client talks to an old server that doesn't support locators. That is,= a server whose data dictionary version is 10.2 or older. Modernizing legac= y code that's probably hardly used anymore, doesn't have very high priority= , so I think it's OK to suppress this warning for now. =20 > Clean up compiler warnings introduced by using Java 5 language features > ----------------------------------------------------------------------- > > Key: DERBY-5840 > URL: https://issues.apache.org/jira/browse/DERBY-5840 > Project: Derby > Issue Type: Improvement > Components: Miscellaneous > Affects Versions: 10.10.1.1 > Reporter: Rick Hillegas > Attachments: derby-5840-01-aa-compatibilityTests.diff, derby-5840= -02-aa-compatibilityTests-again.diff.txt, derby-5840-03-aa-drda.diff, derby= -5840-03-ab-drda.diff, derby-5840-04-aa-client-level.diff, derby-5840-05-aa= -client-deprecation.diff, derby-5840-06-aa-jdbc3-stubs.diff, derby-5840-07-= aa-drda-for-each.diff, derby-5840-08-aa-jdbc3-embedded.diff, derby-5840-09-= aa-test-deprecation-and-unchecked.diff, derby-5840-10-aa-derbynet-perf-syst= em.diff, derby-5840-11-aa-engine-i18n-store-tools.diff, derby-5840-12-aa-jd= bcapi.diff, derby-5840-13-aa.diff, derby-5840-13-aa-remove-suppression.diff= , derby-5840-14-aa-bigdecimal.diff, derby-5840-15-aa-more-suppressions.diff= , derby-5840-16-aa-class-size-catalog.diff, derby-5840-17-aa-property-congl= omerate.diff, derby-5840-18-aa-arrayutil.diff, derby-5840-19-aa-ddutils.dif= f, derby-5840-20-aa-collectnodes.diff, derby-5840-21-aa-arrays.diff, derby-= 5840-22-aa-grouped-aggregates.diff, derby-5840-23-aa-parsers.diff, derby-58= 40-24-aa-clone.diff, derby-5840-25-aa-diskhashtable.diff, derby-5840-26-aa-= backingstorehashtable.diff, derby-5840-27-aa-basemonitor.diff > > > Using Java 5 language features forces us to compile code at level 5 or hi= gher. At this level, the compiler raises warnings not seen at lower levels.= This issue is a place to discuss and attach cleanup to eliminate these war= nings. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira