jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1204160 - /jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java
Date Sun, 20 Nov 2011 13:19:22 GMT
Author: pmouawad
Date: Sun Nov 20 13:19:22 2011
New Revision: 1204160

URL: http://svn.apache.org/viewvc?rev=1204160&view=rev
Log:
Make conversion safe to avoid findbugs warning

Modified:
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java?rev=1204160&r1=1204159&r2=1204160&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java
(original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecorator.java
Sun Nov 20 13:19:22 2011
@@ -49,7 +49,7 @@ public abstract class TCPClientDecorator
                 byte[] b = new byte[len];
                 for (int i = 0; i < len; i++) {
                     int offset = (b.length - 1 - i) * 8;
-                    b[i] = (byte) (value >>> offset);
+                    b[i] = (byte) ((value >>> offset) & 0xFF);
                 }
                 return b;
             }



Mime
View raw message