hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.
Date Wed, 22 Dec 2010 19:53:01 GMT

    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974357#action_12974357

stack commented on HBASE-3387:

Patch looks good Jesse.  Thanks for making it.   Minor comments are that you changed a bunch
of formatting -- 90% of it is improvement over what was there previous -- but you messed up
the license formatting on the top of the file.  Also, minor stylistic comment is that you
wrote the equals with a load of indentation when you could have done without by doing the
'other' test first.  For example:

If instead of a #133 that looks like this:

+    if (x != null && y != null) {

.. you instead did:

if (x == null || y == null) return false;

... you'd save an indent and IMO the code is easier to read?

What you think?  If you'd like to fix the above, go for it... otherwise, i'll fix the license
myself and commit as is.


> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>         Attachments: HBASE-3387.patch
>   Original Estimate: 0h
>  Remaining Estimate: 0h
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent
Object. However, with any type of array this is merely going to compare the array pointers,
rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being
an array, then checking the underlying elements.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message