[
https://issues.apache.org/jira/browse/LANG-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155170#comment-13155170
]
Konstantin Kolinko commented on LANG-778:
-----------------------------------------
My review comments (not binding) for
https://issues.apache.org/jira/secure/attachment/12504739/LANG-778.diff
1. In toByteArray() method you do not need those "& 0xff". The narrowing
conversion as defined by JLS rejects the higher bits.
2. The fromBytes() method implementation: I think it would be better and faster
to implement it through a call to UUID(long, long) instead of using
UUID.fromString().
3. Code style: positioning of "{" chars is inconsistent. It is on new lines in
class and method declarations, but on the same line after "if/for".
4. It is a bit odd to see 5 uppercase characters in a row in class name, but
that is consistent with the name of "java.util.UUID" class.
5. I agree that this utility class is useful.
> Add UUIDUtils.toByteArray and UUIDUtils.fromByteArray
> -----------------------------------------------------
>
> Key: LANG-778
> URL: https://issues.apache.org/jira/browse/LANG-778
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.*
> Reporter: Joerg Schaible
> Assignee: Joerg Schaible
> Priority: Minor
> Attachments: LANG-778.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> A UUID represents 16 bytes. In some situation (e.g. using DBs that do not
> have native support for the type UUID) it is necessary to use directly the
> bytes. The JDK does not support the transformation from UUID to bytes and
> back, therefore I'd like to add UUIDUtils with the two proposed methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira