You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Andrew McIntyre <mc...@gmail.com> on 2006/08/02 03:44:53 UTC

Reference to org.apache.derby.impl.Util in client NetConnection40?

I'm working on DERBY-1424, building the client jar with classlister,
and after adding NetConnection40 to the list of entry points for the
dependency checker, the dependency list contained several hundred
engine classes.

NetConnection40.java contains this:

...
import org.apache.derby.impl.jdbc.Util;
...
    public boolean isValid(int timeout) throws SQLException {
        // Validate that the timeout has a legal value
        if (timeout < 0) {
            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
                                              new Integer(timeout), "timeout",
                                              "java.sql.Connection.isValid");
        }
...

Shouldn't the client be using its own machinery to generate
exceptions? Also, this bit of code would throw a
ClassNotFoundException for Util if a user were running with just
derbyclient.jar as it is.

I'll file a bug shortly.

andrew

Re: Reference to org.apache.derby.impl.Util in client NetConnection40?

Posted by David Van Couvering <Da...@Sun.COM>.
Yes, I concur, using the wrong method to generate an exception.

David

Andrew McIntyre wrote:
> I'm working on DERBY-1424, building the client jar with classlister,
> and after adding NetConnection40 to the list of entry points for the
> dependency checker, the dependency list contained several hundred
> engine classes.
> 
> NetConnection40.java contains this:
> 
> ...
> import org.apache.derby.impl.jdbc.Util;
> ...
>    public boolean isValid(int timeout) throws SQLException {
>        // Validate that the timeout has a legal value
>        if (timeout < 0) {
>            throw 
> Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,
>                                              new Integer(timeout), 
> "timeout",
>                                              
> "java.sql.Connection.isValid");
>        }
> ...
> 
> Shouldn't the client be using its own machinery to generate
> exceptions? Also, this bit of code would throw a
> ClassNotFoundException for Util if a user were running with just
> derbyclient.jar as it is.
> 
> I'll file a bug shortly.
> 
> andrew