From do-not-reply at jboss.org Fri Jul 1 08:24:27 2011 Content-Type: multipart/mixed; boundary="===============7806578587338024881==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r10906 - trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl. Date: Fri, 01 Jul 2011 08:24:27 -0400 Message-ID: <201107011224.p61CORU9015230@svn01.web.mwc.hst.phx2.redhat.com> --===============7806578587338024881== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-07-01 08:24:27 -0400 (Fri, 01 Jul 2011) New Revision: 10906 Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/Pac= ketDecoder.java trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/Rem= otingConnectionImpl.java Log: Reduce visibility. Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/i= mpl/PacketDecoder.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/protocol/core/impl/Pa= cketDecoder.java 2011-07-01 12:23:52 UTC (rev 10905) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/Pa= cketDecoder.java 2011-07-01 12:24:27 UTC (rev 10906) @@ -85,7 +85,6 @@ import static org.hornetq.core.protocol.core.impl.PacketImpl.SUBSCRIBE_TOP= OLOGY; = import org.hornetq.api.core.HornetQBuffer; -import org.hornetq.core.logging.Logger; import org.hornetq.core.protocol.core.Packet; import org.hornetq.core.protocol.core.impl.wireformat.ClusterTopologyChang= eMessage; import org.hornetq.core.protocol.core.impl.wireformat.CreateQueueMessage; @@ -157,15 +156,17 @@ * A PacketDecoder * * @author Tim Fox - * - * */ -public class PacketDecoder +public final class PacketDecoder { - private static final Logger log =3D Logger.getLogger(PacketDecoder.clas= s); - = - public Packet decode(final HornetQBuffer in) + + private PacketDecoder() { + // Utility + } + + public static Packet decode(final HornetQBuffer in) + { final byte packetType =3D in.readByte(); = Packet packet; Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/i= mpl/RemotingConnectionImpl.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/protocol/core/impl/Re= motingConnectionImpl.java 2011-07-01 12:23:52 UTC (rev 10905) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/Re= motingConnectionImpl.java 2011-07-01 12:24:27 UTC (rev 10906) @@ -80,8 +80,6 @@ = private final Object failLock =3D new Object(); = - private final PacketDecoder decoder =3D new PacketDecoder(); - private volatile boolean dataReceived; = private final Executor executor; @@ -418,7 +416,7 @@ { try { - final Packet packet =3D decoder.decode(buffer); + final Packet packet =3D PacketDecoder.decode(buffer); = if (packet.isAsyncExec() && executor !=3D null) { --===============7806578587338024881==--