aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/helper/StringFinderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/helper/StringFinderTest.java')
-rw-r--r--test/org/traccar/helper/StringFinderTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/org/traccar/helper/StringFinderTest.java b/test/org/traccar/helper/StringFinderTest.java
index 71f9215db..1c8234db1 100644
--- a/test/org/traccar/helper/StringFinderTest.java
+++ b/test/org/traccar/helper/StringFinderTest.java
@@ -8,6 +8,7 @@ import org.junit.Assert;
import org.junit.Test;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
@@ -17,7 +18,7 @@ public class StringFinderTest {
@Test
public void testFind() {
- ChannelBuffer buf = ChannelBuffers.copiedBuffer("hello world", Charset.defaultCharset());
+ ChannelBuffer buf = ChannelBuffers.copiedBuffer("hello world", StandardCharsets.US_ASCII);
Assert.assertEquals(-1, buf.indexOf(0, buf.writerIndex(), new StringFinder("bar")));
Assert.assertEquals(6, buf.indexOf(0, buf.writerIndex(), new StringFinder("world")));