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 "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2010/05/11 01:02:30 UTC

[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Dag H. Wanvik updated DERBY-4531:
---------------------------------

    Attachment: derby-4531.diff

Uploading a patch that removes the finalizer close. Regrressions ran ok. I have asked Lance to comment on the JDBC semantics, and I intend to hold back commit until we agree that this change is the right way to go.
It does change behavior, so I make it with release note needed.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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