commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david cogen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-827) CompareToBuilder's doc doesn't specify precedence of fields it uses in performing comparisons
Date Tue, 25 Sep 2012 15:19:08 GMT
david cogen created LANG-827:
--------------------------------

             Summary: CompareToBuilder's doc doesn't specify precedence of fields it uses
in performing comparisons
                 Key: LANG-827
                 URL: https://issues.apache.org/jira/browse/LANG-827
             Project: Commons Lang
          Issue Type: Improvement
          Components: lang.builder.*
    Affects Versions: 3.1
            Reporter: david cogen


The doc does not specify in what order the fields declared using append() are applied. So
if for example I use CompareToBuilder to build a comparator for a class Complex (2 doubles),
and I use append(c.real) followed by append(c.imag), does the comparison consider the real
or imaginary part "more important" for the final result of the comparison.

And similarly, the reflection versions also don't specify the order of the fields they consider.

Yes, I can experiment to determine the behavior. Which I am about to do. But I am not comfortable
relying on experimentally-determined, undocumented behavior for correcteness. Which is why
I classified this as Major priority, not Minor or Trivial.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message