From do-not-reply at jboss.org Mon Feb 27 10:04:01 2012 Content-Type: multipart/mixed; boundary="===============3768255302710151565==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r12202 - trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl. Date: Mon, 27 Feb 2012 10:04:00 -0500 Message-ID: <201202271504.q1RF407m018296@svn01.web.mwc.hst.phx2.redhat.com> --===============3768255302710151565== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2012-02-27 10:03:59 -0500 (Mon, 27 Feb 2012) New Revision: 12202 Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/XidIm= pl.java Log: Simplify hashCode calculation. Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/imp= l/XidImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/XidI= mpl.java 2012-02-27 15:03:44 UTC (rev 12201) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/XidI= mpl.java 2012-02-27 15:03:59 UTC (rev 12202) @@ -14,19 +14,20 @@ package org.hornetq.core.transaction.impl; = import java.io.Serializable; +import java.util.Arrays; = import javax.transaction.xa.Xid; = import org.hornetq.utils.Base64; = /** - * = + * * Xid implementation - * = + * * @author Adrian Brock * @author Tim Fox * @author Juha Lindfors - * = + * * @version $Revision 1.1 $ */ public class XidImpl implements Xid, Serializable @@ -201,8 +202,7 @@ private void calcHash() { byte[] hashBytes =3D XidImpl.toByteArray(this); - String s =3D new String(hashBytes); - hash =3D s.hashCode(); + hash =3D Arrays.hashCode(hashBytes); hashCalculated =3D true; } = --===============3768255302710151565==--