You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2012/01/04 03:13:16 UTC
svn commit: r1227027 - in /jmeter/trunk/test/src/org/apache/jmeter:
functions/PackageTest.java protocol/tcp/sampler/BinaryTCPClientImplTest.java
protocol/tcp/sampler/TCPClientDecoratorTest.java
Author: sebb
Date: Wed Jan 4 02:13:16 2012
New Revision: 1227027
URL: http://svn.apache.org/viewvc?rev=1227027&view=rev
Log:
Dead stores (Findbugs)
Modified:
jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java
jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java
jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java
Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java?rev=1227027&r1=1227026&r2=1227027&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/PackageTest.java Wed Jan 4 02:13:16 2012
@@ -300,16 +300,16 @@ public class PackageTest extends JMeterT
}
public void splitTest1() throws Exception {
- SplitFunction split = null;
String src = "";
try {
- split = splitParams("a,b,c", null, null);
+ splitParams("a,b,c", null, null);
fail("Expected InvalidVariableException (wrong number of parameters)");
} catch (InvalidVariableException e) {
// OK
}
src = "a,b,c";
+ SplitFunction split;
split = splitParams(src, "VAR1", null);
assertEquals(src, split.execute());
assertEquals(src, vars.get("VAR1"));
Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java?rev=1227027&r1=1227026&r2=1227027&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java Wed Jan 4 02:13:16 2012
@@ -56,7 +56,7 @@ public class BinaryTCPClientImplTest ext
// ignored
}
try {
- ba = BinaryTCPClientImpl.hexStringToByteArray("0f107xxf8081ff"); // invalid
+ BinaryTCPClientImpl.hexStringToByteArray("0f107xxf8081ff"); // invalid
fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException expected){
// ignored
@@ -79,7 +79,7 @@ public class BinaryTCPClientImplTest ext
ByteArrayOutputStream os = new ByteArrayOutputStream();
bi.write(os, "3132333435"); // '12345'
os.close();
- assertEquals("12345",os.toString());
+ assertEquals("12345",os.toString("ISO-8859-1"));
ByteArrayInputStream bis = new ByteArrayInputStream(os.toByteArray());
assertEquals("3132333435",bi.read(bis));
}
Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java?rev=1227027&r1=1227026&r2=1227027&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/TCPClientDecoratorTest.java Wed Jan 4 02:13:16 2012
@@ -160,8 +160,8 @@ public class TCPClientDecoratorTest exte
} catch (IllegalArgumentException iae) {
}
try {
- ba = TCPClientDecorator.intToByteArray(0, 5);
- fail();
+ TCPClientDecorator.intToByteArray(0, 5);
+ fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException iae) {
}
}