db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2191) Cleanup of FormatableBitSet
Date Tue, 09 Jan 2007 08:57:27 GMT

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

Dyre Tjeldvoll commented on DERBY-2191:

Thank you for looking at the results :)

Some answers to your questions:

- Yes, I would prefer to remove code that isn't used. (Only caveat is that the two-arg constructor
is really useful when writing tests. Particularly if you want to create a bitset that doesn't
have a multiple of 8 number of bytes)

- Yes, I would prefer to have value!=null be an ivariant as well (Possible caveat; can you
assign to value in the ctor used when doing de-serialization?)

- No, I don't like the way asserts are used either. Apart from what you mention it also makes
it hard(er) to write tests that will work both in sane and insane mode.

- Yes, would prefer that isSet didn't catch ArrayIndexOutOfBoundsException, or always checked
the validity of its arguments. If you want all access to invalid bit indices to be handled
the same way, I think you will have to check the argument manually since you are not guaranteed
that access to a bit index larger than the bitset's max index  will trigger an ArrayIndexOutOfBoundsException.

> Cleanup of FormatableBitSet
> ---------------------------
>                 Key: DERBY-2191
>                 URL: https://issues.apache.org/jira/browse/DERBY-2191
>             Project: Derby
>          Issue Type: Improvement
>          Components: Miscellaneous
>    Affects Versions:
>            Reporter: Dyre Tjeldvoll
>         Assigned To: Dyre Tjeldvoll
>            Priority: Trivial
>             Fix For:
>         Attachments: deadcode.v1.diff, deadcode.v2.diff, FormatableBitSetTest.java
> The implementation of FormatableBitSet could be streamlined. Dead code can be removed
and the implementation of some methods can be simplified.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message