db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dibyendu Majumdar (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-3451) Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.
Date Fri, 22 Feb 2008 23:19:19 GMT
Remove dependency between StandardException class and org.apache.derby.impl.jdbc classes.

                 Key: DERBY-3451
                 URL: https://issues.apache.org/jira/browse/DERBY-3451
             Project: Derby
          Issue Type: Sub-task
            Reporter: Dibyendu Majumdar

In the package org.apache.derby.iapi.error, the class StandardException contains references
to following classes:

This is undesirable as it introduces a dependency between StandardException and the implementation
of EmbedSQLException.

To remove this dependency, following changes have been made.

A new interface called DerbySQLException has been added to org.apache.derby.iapi.error.
The EmbedSQLException class has been modified to implement this interface.
The StandardException calls the isSimpleWrapper method on the DerbySQLException interface,
thereby avoiding a need to reference EmbedSQLException.

A new static method getArgumentFerry() has been added to StandardExcepion. This performs the
same task as the current getArgumentFerry() method in SQLExceptionFactory and SQLExceptionFactory40.
SQLExceptionFactory.getArgumentFerry() has been amended to call StandardException.getArgumentFerry().
SQLExceptionFactory40.getArgumentFerry() has been removed.
StandardException.getArgumentFerry() now handles the pre-JDBC3 and post-JDBC4 scenarios (in
the pre-JDBC4 scenario, the passed argument is a DerbySQLException, which is returned immediately),
so there is no need to override this functionality.

This change allows us to avoid having a dependency between StandardException and Util.
As the getArgumentFerry() method now checks for DerbySQLException rather than EmbedSQLException,
it is able to avoid dependency on EmbedSQLException.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message