On 29 May 2012 10:14, <l...@apache.org> wrote: > Author: luc > Date: Tue May 29 09:14:37 2012 > New Revision: 1343616 > > URL: http://svn.apache.org/viewvc?rev=1343616&view=rev > Log: > Use proper conversion for primitive hashcode. > JIRA: MATH-793
-1 The fix ignores what I wrote in the JIRA. > Modified: > > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java > > Modified: > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java > URL: > http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java?rev=1343616&r1=1343615&r2=1343616&view=diff > ============================================================================== > --- > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java > (original) > +++ > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/partitioning/utilities/OrderedTuple.java > Tue May 29 09:14:37 2012 > @@ -301,12 +301,12 @@ public class OrderedTuple implements Com > /** {@inheritDoc} */ > @Override > public int hashCode() { > - return Arrays.hashCode(components) ^ > - ((Integer) offset).hashCode() ^ > - ((Integer) lsb).hashCode() ^ > - ((Boolean) posInf).hashCode() ^ > - ((Boolean) negInf).hashCode() ^ > - ((Boolean) nan).hashCode(); > + return Arrays.hashCode(components) ^ > + Integer.valueOf(offset).hashCode() ^ > + Integer.valueOf(lsb).hashCode() ^ As noted in the JIRA, the conversion to Integer is completely unnnecessary; just use the int value. > + Boolean.valueOf(posInf).hashCode() ^ > + Boolean.valueOf(negInf).hashCode() ^ > + Boolean.valueOf(nan).hashCode(); Similarly here. > } > > /** Get the components array. > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org