diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:19:28 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-07 14:19:28 +1300 |
commit | 2260e9543dc586300b005c97ca83b2902c414968 (patch) | |
tree | 0ac295e51c084fae971684f5e5ac114ebc733f09 /test/org | |
parent | 83382e14d92cadaa40c62d07cdba05a6ded5af83 (diff) | |
download | trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.tar.gz trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.tar.bz2 trackermap-server-2260e9543dc586300b005c97ca83b2902c414968.zip |
Replace valueOf with parseXxx calls
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/helper/ChannelBufferToolsTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java index fb99a9038..2d1c1f0ca 100644 --- a/test/org/traccar/helper/ChannelBufferToolsTest.java +++ b/test/org/traccar/helper/ChannelBufferToolsTest.java @@ -11,7 +11,7 @@ public class ChannelBufferToolsTest { @Test public void testReadHexInteger() { - byte[] buf = {0x01,(byte)0x90,0x34}; + byte[] buf = {0x01, (byte) 0x90, 0x34}; int result = ChannelBufferTools.readHexInteger( factory.getBuffer(buf, 0, buf.length), 5); assertEquals(1903, result); @@ -19,23 +19,23 @@ public class ChannelBufferToolsTest { @Test public void testReadHexString() { - byte[] buf = {0x01,(byte)0x90,0x34}; + byte[] buf = {0x01, (byte) 0x90, 0x34}; String result = ChannelBufferTools.readHexString( factory.getBuffer(buf, 0, buf.length), 5); assertEquals("01903", result); - result = Long.valueOf(result).toString(); + result = String.valueOf(Long.parseLong(result)); assertEquals("1903", result); } @Test public void convertHexStringTest() { - assertArrayEquals(new byte[] {0x12,0x34}, ChannelBufferTools.convertHexString("1234")); + assertArrayEquals(new byte[] {0x12, 0x34}, ChannelBufferTools.convertHexString("1234")); } @Test public void convertHexByteArray() { - assertEquals("1234", ChannelBufferTools.convertByteArray(new byte[] {0x12,0x34})); + assertEquals("1234", ChannelBufferTools.convertByteArray(new byte[] {0x12, 0x34})); } } |