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

Dibyendu Majumdar updated DERBY-3451:
-------------------------------------

    Description: 
In the package org.apache.derby.iapi.error, the class StandardException 
contains references to following classes:
org.apache.derby.impl.jdbc.Util
org.apache.derby.impl.jdbc.EmbedSQLException

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


  was:
In the package org.apache.derby.iapi.error, the class StandardException 
contains references to following classes:
org.apache.derby.impl.jdbc.Util
org.apache.derby.impl.jdbc.EmbedSQLException

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.


> 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:
> org.apache.derby.impl.jdbc.Util
> org.apache.derby.impl.jdbc.EmbedSQLException
> This is undesirable as it introduces a dependency between StandardException 
> and the implementation of EmbedSQLException.

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

Reply via email to