commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27813] - Alterations to Binary.java and its unit test for 1.3 release
Date Sun, 21 Mar 2004 01:19:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27813>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27813

Alterations to Binary.java and its unit test for 1.3 release





------- Additional Comments From ggregory@seagullsw.com  2004-03-21 01:19 -------
Patch partially applied and modified:

(1) The bitset methods and tests do not compile on <1.4. I've fixed that in
another patch attached to this ticket if/when we want to use it here.

(2) I did not include the bit set methods in this pass as they seem to be out of
context for this class but would like to discuss this. The Binary codec as is
today converts between byte arrays and "0/1" strings. If we want to convert to
and from BitSet objects, maybe this is another codec or a BitSetUtils class in
[lang]?

(3) All Java strings are Unicode, so the use of "ASCII" in comments and method
names is misleading IMO, especially when what is meant are "Strings of 0s and
1s" so I'd like to not use "Ascii" in method names. I'll try to address that on
commons-dev.

(4) I've also renamed the instance method "byte[] decode(Object)" to
"toByteArray" because the name "decode" was being overloaded but not overriden,
which to makes the class more confusing to understand IMHO considering the codec
interfaces Decoder, StringDecoder, and BinaryDecoder. I found this tricky since
Binary is NOT a StringDecoder but a BinaryDecoder. Using "decode" the method
look like a framework implementation method when it is not. This is all I
suppose a reflection on how truly useful these interfaces are in the first
place, a different topic I know.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message