Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 60DE8C4DC for ; Tue, 3 Jul 2012 13:58:26 +0000 (UTC) Received: (qmail 7514 invoked by uid 500); 3 Jul 2012 13:58:26 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 7418 invoked by uid 500); 3 Jul 2012 13:58:24 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 7395 invoked by uid 99); 3 Jul 2012 13:58:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 13:58:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 13:58:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CB84B2388A38; Tue, 3 Jul 2012 13:57:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1356735 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility: JDBCDriverTest.java VersionCombinationConfigurator.java VersionedNetworkServerTestSetup.java _Suite.java Date: Tue, 03 Jul 2012 13:57:59 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120703135759.CB84B2388A38@eris.apache.org> Author: rhillegas Date: Tue Jul 3 13:57:58 2012 New Revision: 1356735 URL: http://svn.apache.org/viewvc?rev=1356735&view=rev Log: DERBY-5840: Silence compiler warnings in the compatibility tests. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/_Suite.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java?rev=1356735&r1=1356734&r2=1356735&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java Tue Jul 3 13:57:58 2012 @@ -219,10 +219,10 @@ public class JDBCDriverTest ///////////////////////////////////////////////////////////// // map derby type name to type descriptor - private static HashMap _types = new HashMap(); // maps Derby type names to TypeDescriptors + private static HashMap _types = new HashMap(); // map jdbc type to index into COERCIONS - private static HashMap _coercionIndex = new HashMap(); // maps jdbc types to legal coercions + private static HashMap _coercionIndex = new HashMap(); ///////////////////////////////////////////////////////////// // @@ -783,7 +783,7 @@ public class JDBCDriverTest // Verify that we can select all legal datatypes in a table. // private void readTable(String tableName, TypeDescriptor[] types, - Object[][] rows, List casts ) + Object[][] rows, List casts ) throws SQLException { PreparedStatement ps = readTableQuery(tableName, types); ResultSet rs = ps.executeQuery(); @@ -884,7 +884,7 @@ public class JDBCDriverTest * @throws Exception */ private void checkRows(PreparedStatement ps, TypeDescriptor[] types, - Object[][] rows, List casts) + Object[][] rows, List casts) throws SQLException { int typeCount = types.length; @@ -943,7 +943,7 @@ public class JDBCDriverTest * @param casts */ private void checkCoercions(PreparedStatement ps, TypeDescriptor type, - List casts) + List casts) throws SQLException { String columnName = type.getDerbyTypeName(); T_CN coercionDesc = COERCIONS[ getCoercionIndex(type.getJdbcType()) ]; Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java?rev=1356735&r1=1356734&r2=1356735&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java Tue Jul 3 13:57:58 2012 @@ -269,9 +269,15 @@ public class VersionCombinationConfigura /** * Sorts and filters out distributions based on the configurator settings. * + * We suppress warnings here because DerbyDistribution needs to + * implement Comparable and not just Comparable. But DerbyDistribution + * lives in a package which has to compile at level 1.4 and so cannot be + * declared that way. + * * @param distributions list of distributions to filter * @return A filtered list of distributions. */ + @SuppressWarnings("unchecked") private List sortAndFilterVersions( List distributions) { // Sort the releases based on the version number (highest first). @@ -307,7 +313,7 @@ public class VersionCombinationConfigura */ static URL getClassURL(final Class cl) { return (URL) - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction() { public Object run() { if (cl.getProtectionDomain().getCodeSource() == null) { Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java?rev=1356735&r1=1356734&r2=1356735&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java Tue Jul 3 13:57:58 2012 @@ -88,7 +88,7 @@ public class VersionedNetworkServerTestS (appendToClasspath == null ? "" : File.pathSeparator + appendToClasspath); - ArrayList cmd = new ArrayList(); + ArrayList cmd = new ArrayList(); cmd.add("org.apache.derby.drda.NetworkServerControl"); cmd.add("start"); cmd.add("-p"); @@ -170,7 +170,7 @@ public class VersionedNetworkServerTestS private String shutDownInSeparateProcess() { int port = TestConfiguration.getCurrent().getPort(); // java -classpath ... org.apache.derby.drda... - ArrayList cmd = new ArrayList(); + ArrayList cmd = new ArrayList(); cmd.add("org.apache.derby.drda.NetworkServerControl"); cmd.add("shutdown"); cmd.add("-p"); Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/_Suite.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/_Suite.java?rev=1356735&r1=1356734&r2=1356735&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/_Suite.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/_Suite.java Tue Jul 3 13:57:58 2012 @@ -85,9 +85,13 @@ public class _Suite * NOTE: If invalid versions are found a warning is simply * printed to the console. * + * We have to suppress warnings here until DerbyVersion can be compiled + * at Java 5 level. + * * @param versions list of Derby versions, i.e '10.8.1.2,10.7.1.1' * @return A list of parsed Derby versions. */ + @SuppressWarnings("unchecked") private static List parseVersionList(String versions) { if (versions == null || versions.length() == 0) { return Collections.EMPTY_LIST;