db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5840) Clean up compiler warnings introduced by using Java 5 language features
Date Tue, 21 May 2013 15:25:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5840:
--------------------------------------

    Attachment: derby-5840-13-aa-remove-suppression.diff

Attaching derby-5840-13-aa-remove-suppression.diff, which removes some @SuppressWarnings annotations
by making unchecked conversions checked.

- java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java:

Make getTypeMap() use Collections.emptyMap() instead of Collections.EMPTY_MAP. emptyMap()
was added as a type-safe alternative to EMPTY_MAP in Java 5.

- java/engine/org/apache/derby/impl/load/ColumnInfo.java:

When creating a string array from a list of strings, cast each element explicitly to String
instead of relying on an unchecked cast to ArrayList<String>.

- java/engine/org/apache/derby/impl/services/locks/Deadlock.java:

Change a List<Object> variable to plain List, as the type parameter isn't needed the
way the list is used here, and this removes the need to do an unchecked cast from Object to
List<Object>.

- java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java:

Explicitly cast the elements in the untyped lists passed to the init() method.

- java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java:

Remove @SuppressWarnings annotation that's been made unnecessary because of other changes
in this issue.

- java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/Wrapper41Test.java:

Change some occurrences of Class to Class<?>, which allows removing the @SuppressWarnings
annotations.

- java/testing/org/apache/derbyTesting/functionTests/tests/management/MBeanTest.java:

Change the type of the privileged action in getDerbyDomainMBeans() from Object to Set<ObjectName>,
so that the returned value doesn't need to be cast unchecked from Object to Set<ObjectName>.

I'm running tests on the patch.
                
> 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-system.diff, derby-5840-11-aa-engine-i18n-store-tools.diff,
derby-5840-12-aa-jdbcapi.diff, derby-5840-13-aa.diff, derby-5840-13-aa-remove-suppression.diff
>
>
> Using Java 5 language features forces us to compile code at level 5 or higher. 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 warnings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message