db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2444) Implement not implemented methods Blob.getBinaryStream(long pos, long length) and Clob. getCharacterStream(long pos, long length) in the Network Client
Date Fri, 13 Apr 2007 13:48:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488669
] 

Knut Anders Hatlen commented on DERBY-2444:
-------------------------------------------

Thank you for addressing my comments, Narayanan! I think the patch looks good, and I will
commit it when my test run has completed.

One tiny nit (if you want to fix it, it is OK to do it as a follow-up). I think the check
for (pos > this.length()) in Lob.checkPosAndLength() is redundant. Either (length <
0) or ((pos + length) > this.length()) must be true if (pos > this.length()), so an
exception is thrown regardless of that check.

Oh, and one more... There is a slight possibility that (pos+length) overflows and goes negative.
For instance, a valid position combined with a length of Long.MAX_VALUE will not be detected
as an error by checkPosAndLength(), I think. Changing the last check to (length > this.length()
- pos) would eliminate the possibility for an overflow.

> Implement not implemented methods Blob.getBinaryStream(long pos, long length) and Clob.
getCharacterStream(long pos, long length) in the Network Client
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2444
>                 URL: https://issues.apache.org/jira/browse/DERBY-2444
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: ClobBlobNotImplemented_v1.diff, ClobBlobNotImplemented_v1.stat,
ClobBlobNotImplemented_v2.diff, ClobBlobNotImplemented_v2.stat, ClobBlobNotImplemented_v3.diff,
ClobBlobNotImplemented_v3.stat, ClobBlobNotImplemented_v4.diff, ClobBlobNotImplemented_v4.stat
>
>
> The following methods were introduced in the java.sql.Clob and java.sql.Blob interface
as part of JDBC 4.0 and need to be implemented.
> Clob
> ------
> getCharacterStream(long pos, long length)
> Blob
> ------
> getBinaryStream(long pos, long length)

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


Mime
View raw message