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

Rick Hillegas updated DERBY-6751:
---------------------------------
    Attachment: derby-6751-01-ad-usederbyinternals.diff

Attaching derby-6751-01-ad-usederbyinternals.diff. This rev of the patch fixes 
a test regression introduced by the previous rev. I am re-running tests.

I added a method to BaseJDBCTestCase whose signature included the 
LanguageConnectionContext and EmbedConnection types. This made the method 
lookup logic in junit.framework.TestSuite blow up when a TestSuite( 
JDBCDriverTest.class ) was added to the compatibility test suite. That is 
because LanguageConnectionContext and EmbedConnection are not on the 
client-only classpath, which deliberately does not include derby.jar.

I've changed the signature of that method so that it takes a 
java.sql.Connection and returns a java.lang.Object.

Note that BaseJDBCTestCase still imports LanguageConnectionContext and 
EmbedConnection. It is conceivable that there are JVMs out there which would 
raise verification errors when running the compatibility tests. Fixing that 
pre-existing problem is outside the scope of this issue.


> Prevent user code from getting the LanguageConnectionContext from an 
> EmbedConnection
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-6751
>                 URL: https://issues.apache.org/jira/browse/DERBY-6751
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.12.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-6751-01-aa-usederbyinternals.diff, 
> derby-6751-01-ab-usederbyinternals.diff, 
> derby-6751-01-ad-usederbyinternals.diff
>
>
> User code can cast a java.sql.Connection to an EmbedConnection and then get 
> the LanguageConnectionContext by calling 
> EmbedConnection.getLanguageConnection(). We should prevent user code from 
> doing this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to