db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yun Lee (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-4738) correct error prompt for nonpositive length in Blob.setBytesX()
Date Fri, 09 Jul 2010 02:17:50 GMT

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

Yun Lee closed DERBY-4738.
--------------------------


Thanks, Knut. Before I attached the patch, I just run BlobAccessTest and it passed. I will
run regression tests for a extensive test next time. Thanks for your advice.

I agree with your patch on moving the declaration of the length variable. More work need to
be done on this method, just pointed out in Derby-3898. 



> correct error prompt for nonpositive length in Blob.setBytesX()
> ---------------------------------------------------------------
>
>                 Key: DERBY-4738
>                 URL: https://issues.apache.org/jira/browse/DERBY-4738
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.7.0.0
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>             Fix For: 10.7.0.0
>
>         Attachments: derby-4738.patch, derby-4738.stat, init_length.diff
>
>
> In Blob.setBytesX(), when a nonpositive length value (len) is passed in, a SqlException
with ClientMessageId of SQLState.BLOB_NONPOSITIVE_LENGTH is created, however, it uses length,
a wrong length value, which is still zero here.
> if ( len < 0 ) {
>             throw new SqlException(agent_.logWriter_,
>                 new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH),
>                 new Integer(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