~ubuntu-branches/ubuntu/trusty/mysql-connector-java/trusty

« back to all changes in this revision

Viewing changes to src/com/mysql/jdbc/MysqlParameterMetadata.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Miguel Landaeta
  • Date: 2013-07-02 17:07:51 UTC
  • mfrom: (1.1.8) (3.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130702170751-f4rszjabxg0391fr
Tags: 5.1.25-1
* New upstream release
* Refreshed the patches
* Added a patch to build with one JDK and removed the build
  dependency on java-gcj-compat-dev
* Updated Standards-Version to 3.9.4 (no changes)
* Use canonical URLs for the Vcs-* fields
* debian/rules: Improved the clean target to allow rebuilds
* Updated the watch file
* Renamed debian/README.Debian-source to README.source

[ Miguel Landaeta ] 
* Fix FTBFS with OpenJDK 7 (Closes: #706668)
* Remove Michael Koch from Uploaders list.
  Thanks for your work on this package. (Closes: #654122).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 
2
 Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
 
5
5
  The MySQL Connector/J is licensed under the terms of the GPLv2
181
181
     * for an object with the given interface.
182
182
     * @since 1.6
183
183
     */
184
 
        public boolean isWrapperFor(Class iface) throws SQLException {
 
184
        public boolean isWrapperFor(Class<?> iface) throws SQLException {
185
185
 
186
186
                // This works for classes that aren't actually wrapping
187
187
                // anything
202
202
     * @throws java.sql.SQLException If no object found that implements the interface 
203
203
     * @since 1.6
204
204
     */
205
 
        public Object unwrap(Class iface) throws java.sql.SQLException {
 
205
    public <T> T unwrap(Class<T> iface) throws SQLException {
206
206
        try {
207
207
                // This works for classes that aren't actually wrapping
208
208
                // anything
209
 
                return Util.cast(iface, this);
 
209
                return iface.cast(this);
210
210
        } catch (ClassCastException cce) {
211
211
            throw SQLError.createSQLException("Unable to unwrap to " + iface.toString(), 
212
212
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);