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

Anurag Shekhar updated DERBY-2800:
----------------------------------

    Attachment: derby-2800v2.diff

Thanks for the review

 1) In ClobStreamControl.truncate, the wrong length is used for the check to 
reset the position cache. The byte position is compared to the char position in 
the cache object. I think 'length' should be renamed to 'byteLength' and 
'newLength' possibly to 'newCharLength'. Thanks for fixing the existing bug in 
there.

fixed the issue and changed the variable names

 2) ClobStreamControl.copyClobContent(InternalClob,long) should use more 
verbose variable names, like 'charLength' and 'byteLength'. The same could be 
done for the static method, even if there is only one length variable there.

changed variable names

 3) The test has some spelling errors and unused imports.

fixed typos and imports

I plan to add some more tests (I made some notes in the new jdbcapi/ClobTest), 
and I think adding them to a separate class as you have is a nice idea to keep 
the size of the test classes down. 

> Implement Clob.truncate for embedded driver
> -------------------------------------------
>
>                 Key: DERBY-2800
>                 URL: https://issues.apache.org/jira/browse/DERBY-2800
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.3.0.0
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-2800.diff, derby-2800v2.diff
>
>


-- 
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