Index: trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java	(revision 9378)
+++ trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java	(revision 9380)
@@ -5,9 +5,10 @@
 import static org.junit.Assert.assertTrue;
 
+import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 
-import org.apache.tools.ant.filters.StringInputStream;
 import org.junit.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -42,7 +43,11 @@
     }
 
+    /**
+     * Tests invalid data.
+     * @throws Exception always SAXException
+     */
     @Test(expected = SAXException.class)
     public void testException() throws Exception {
-        new GpxReader(new StringInputStream("--foo--bar--")).parse(true);
+        new GpxReader(new ByteArrayInputStream("--foo--bar--".getBytes(StandardCharsets.UTF_8))).parse(true);
     }
 }
