[
https://issues.apache.org/jira/browse/DERBY-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465266
]
Knut Anders Hatlen commented on DERBY-2191:
-------------------------------------------
If we have a check for the position, I think we should test both whether it is
too big and whether it is too small. None of those cases should happen, and I
don't think bugs causing negative positions are less likely or less severe than
bugs causing too big positions. If negative positions always caused other
exceptions, it would probably be OK to skip the test, but I'm not sure they
always do. At least, it doesn't seem like isSet(), set() and clear() always
throw exceptions when the position is negative. I think it must be
_sufficiently_ negative compared to the size of the bit set before an exception
is thrown. :) In FormatableBitSetTest, set(-1) and clear(-1) fail when the set
is empty, but don't fail otherwise. isSet(-1) doesn't fail in any case.
> Cleanup of FormatableBitSet
> ---------------------------
>
> Key: DERBY-2191
> URL: https://issues.apache.org/jira/browse/DERBY-2191
> Project: Derby
> Issue Type: Improvement
> Components: Miscellaneous
> Affects Versions: 10.2.1.6
> Reporter: Dyre Tjeldvoll
> Assigned To: Dyre Tjeldvoll
> Priority: Trivial
> Fix For: 10.3.0.0
>
> Attachments: deadcode.v1.diff, deadcode.v2.diff, fbstst.v1.diff,
> fbstst.v1.stat, FormatableBitSetTest.java, valuenotnull.v1.diff,
> valuenotnull.v1.stat
>
>
> 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