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-2646) Cleanup of Clob control/support structures
Date Tue, 05 Jun 2007 14:05:26 GMT

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

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

Thanks for explaining the synchronization and opening a new issue!

One more minor comment. Aren't these checks in StoreStreamClob's constructor redundant?

        if (stream == null) {
            throw new IllegalArgumentException("Stream cannot be <null>");
        }
        if (conChild == null) {
            throw new IllegalArgumentException("conChild cannot be <null>");
        }
        if (!(stream instanceof Resetable)) {
            throw new IllegalArgumentException("Stream must be resetable: " +
                stream.toString());
        }

Without these checks, the constructor would have thrown NullPointerException (for the first
two) and ClassCastException (for the last one). I'm not sure throwing IllegalArgumentException
instead of NPE/CCE adds any value. Perhaps we should remove the checks and add @throws tags
to the javadoc stating explicitly that we get NPE when stream or conChild is null and CCE
if stream is not a Resetable?

> Cleanup of Clob control/support structures
> ------------------------------------------
>
>                 Key: DERBY-2646
>                 URL: https://issues.apache.org/jira/browse/DERBY-2646
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2646-01a_trailing_space.diff, derby-2646-01a_trailing_space.stat,
derby-2646-02a-clob-reorg.diff, derby-2646-02a-clob-reorg.stat, derby-2646-03a-internalclob.diff,
derby-2646-04a-storestreamclob_utf8util.diff, derby-2646-04a-storestreamclob_utf8util.stat,
derby-2646-04b-storestreamclob_utf8util.diff, derby-2646-05a-tests.diff, derby-2646-05a-tests.stat,
derby-2646-05b-tests.diff
>
>


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