You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/07/08 19:03:29 UTC

[jira] Created: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Tests fail to build under 1.6, and warning while compiling source
-----------------------------------------------------------------

         Key: DBUTILS-32
         URL: http://issues.apache.org/jira/browse/DBUTILS-32
     Project: Commons DbUtils
        Type: Bug

    Reporter: Henri Yandell


test:compile:
    [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
/home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
class SqlNullCheckedResultSetMockBlob implements Blob {
^
/home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
class SqlNullCheckedResultSetMockClob implements Clob {

and warning of:

    [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
/home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
            ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DBUTILS-32?page=all ]

Henri Yandell updated DBUTILS-32:
---------------------------------

    Fix Version/s: 1.1

> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Alan B. Canon (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DBUTILS-32?page=comments#action_12445984 ] 
            
Alan B. Canon commented on DBUTILS-32:
--------------------------------------

The compiler errors for the tests can be fixed by adding no-op implementations of the previously unimplemented methods, viz.:

class SqlNullCheckedResultSetMockClob implements Clob {

    public void free() throws SQLException {
    }

    public Reader getCharacterStream(long pos, long length) throws SQLException {
      return null;
    }
}

class SqlNullCheckedResultSetMockBlob implements Blob {
    public void free() throws SQLException {
      
    }

    public InputStream getBinaryStream(long pos, long length) throws SQLException {
      return null;
    }
}


> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Alan B. Canon (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DBUTILS-32?page=all ]

Alan B. Canon updated DBUTILS-32:
---------------------------------

    Attachment: patch-DBUTILS-32.txt

Sorry, the previous patch addressed two separate issues. The present attachment resolves only DBUTILS-32 (the present issue)

> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>         Attachments: patch-DBUTILS-32.txt, patch.txt
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Resolved: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DBUTILS-32?page=all ]

Henri Yandell resolved DBUTILS-32.
----------------------------------

    Resolution: Fixed


Thanks Alan.

 svn ci -m "Applying Alan Canon's patch for DBUTILS-32" 

Sending        src/java/org/apache/commons/dbutils/BeanProcessor.java
Sending        src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
Sending        src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java
Transmitting file data ...
Committed revision 470003.


I've also tested it under 1.6 on a Linux box (back to hating the Mac for not having 1.6).

Btw, good naming for patches would be 'DBUTILS-32.patch'. Not sure about the repeat though :)


> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>         Attachments: patch-DBUTILS-32.txt, patch.txt
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Alan B. Canon (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DBUTILS-32?page=comments#action_12445977 ] 
            
Alan B. Canon commented on DBUTILS-32:
--------------------------------------

SqlNullCheckedResultSet.java can be fixed to avoid the compiler warning by changing the implementation of invoke() to read as follows.

    public Object invoke(Object proxy, Method method, Object[] args)
        throws Throwable {

        Object result = method.invoke(this.rs, args);

        Method nullMethod = (Method) nullMethods.get(method.getName());

        // Check nullMethod != null first so that we don't call wasNull()
        // before a true getter method was invoked on the ResultSet.
        return (nullMethod != null && this.rs.wasNull())
            ? nullMethod.invoke(this, (Object[]) null)
            : result;
    }

> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Alan B. Canon (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DBUTILS-32?page=all ]

Alan B. Canon updated DBUTILS-32:
---------------------------------

    Attachment: patch.txt

Patch is attached resolving issues as described in previous comments.

> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>         Attachments: patch.txt
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (DBUTILS-32) Tests fail to build under 1.6, and warning while compiling source

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DBUTILS-32?page=comments#action_12446007 ] 
            
Henri Yandell commented on DBUTILS-32:
--------------------------------------

Any chance of a patch?

> Tests fail to build under 1.6, and warning while compiling source
> -----------------------------------------------------------------
>
>                 Key: DBUTILS-32
>                 URL: http://issues.apache.org/jira/browse/DBUTILS-32
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.1
>
>
> test:compile:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/test-classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:841: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockBlob is not abstract and does not override abstract method getBinaryStream(long,long) in java.sql.Blob
> class SqlNullCheckedResultSetMockBlob implements Blob {
> ^
> /home/hen/apache/jakarta/commons-proper/dbutils/src/test/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java:882: org.apache.commons.dbutils.wrappers.SqlNullCheckedResultSetMockClob is not abstract and does not override abstract method getCharacterStream(long,long) in java.sql.Clob
> class SqlNullCheckedResultSetMockClob implements Clob {
> and warning of:
>     [javac] Compiling 20 source files to /home/hen/apache/jakarta/commons-proper/dbutils/target/classes
> /home/hen/apache/jakarta/commons-proper/dbutils/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java:372: warning: non-varargs call of varargs method with inexact argument type for last parameter;
> cast to java.lang.Object for a varargs call
> cast to java.lang.Object[] for a non-varargs call and to suppress this warning
>             ? nullMethod.invoke(this, null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org