[
http://issues.apache.org/jira/browse/DERBY-796?page=comments#action_12363924 ]
Daniel John Debrunner commented on DERBY-796:
---------------------------------------------
One quick comment (I'm still reviewing the rest) in EmbedPreparedStatement40.
The code throwing exceptions seems strange to me, and I don't think matches
code elsewhere.
+ throw
Util.newEmbedSQLException(SQLState.LANG_INVALID_COLUMN_LENGTH,
+ new Object[]{new String("setBlob()")},
+ StandardException.getSeverityFromIdentifier
+ (SQLState.LANG_INVALID_COLUMN_LENGTH));
1) I don't understand the code new String("setBlob()") - "setBlob()" is already
a String, why convert it to a String again?
In fact I never understood why that constructor String(String s) exists!
2) Usually when throwing exceptions, the calling code doesn't create the Object
array for the arguments, or calculate the severity. It's handled by utility
methods. Look at other examples in EmbedPreparedStatement, e.g.
line 1239
throw newSQLException(SQLState.NO_INPUT_PARAMETERS)
line 1247
throw newSQLException(SQLState.LANG_INVALID_PARAM_POSITION,
new Integer(parameterIndex), new Integer(types.length))
> jdbc 4.0 specific Blob and Clob method support
> ----------------------------------------------
>
> Key: DERBY-796
> URL: http://issues.apache.org/jira/browse/DERBY-796
> Project: Derby
> Type: New Feature
> Components: JDBC
> Versions: 10.2.0.0
> Environment: jdbc 4.0 on all platforms
> Reporter: V.Narayanan
> Assignee: V.Narayanan
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: lob.diff, lob_1.diff
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira