Index: trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java	(revision 16955)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java	(revision 16956)
@@ -6,8 +6,8 @@
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.StringReader;
 import java.nio.charset.StandardCharsets;
 import java.util.List;
@@ -65,12 +65,4 @@
     GeoJSONReader() {
         // Restricts visibility
-    }
-
-    private void parse(InputStream inputStream) throws IllegalDataException {
-        try (JsonParser parser = Json.createParser(inputStream)) {
-            parse(parser);
-        } catch (JsonParsingException e) {
-            throw new IllegalDataException(e);
-        }
     }
 
@@ -384,22 +376,24 @@
     @Override
     protected DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
-        InputStream markSupported = source.markSupported() ? source : new BufferedInputStream(source);
-        ds.setUploadPolicy(UploadPolicy.DISCOURAGED);
-        if (isLineDelimited(markSupported)) {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(markSupported, StandardCharsets.UTF_8));
-            String line = null;
-            String rs = new String(new byte[]{RECORD_SEPARATOR_BYTE}, StandardCharsets.US_ASCII);
-            try {
-                while ((line = reader.readLine()) != null) {
-                    line = Utils.strip(line, rs);
-                    try (InputStream is = new ByteArrayInputStream(line.getBytes(StandardCharsets.UTF_8))) {
-                        parse(is);
+        try (InputStream markSupported = source.markSupported() ? source : new BufferedInputStream(source)) {
+            ds.setUploadPolicy(UploadPolicy.DISCOURAGED);
+            if (isLineDelimited(markSupported)) {
+                try (BufferedReader reader = new BufferedReader(new InputStreamReader(markSupported, StandardCharsets.UTF_8))) {
+                    String line;
+                    String rs = new String(new byte[]{RECORD_SEPARATOR_BYTE}, StandardCharsets.US_ASCII);
+                    while ((line = reader.readLine()) != null) {
+                        line = Utils.strip(line, rs);
+                        try (JsonParser parser = Json.createParser(new StringReader(line))) {
+                            parse(parser);
+                        }
                     }
                 }
-            } catch (IOException e) {
-                throw new IllegalDataException(e);
-            }
-        } else {
-            parse(markSupported);
+            } else {
+                try (JsonParser parser = Json.createParser(markSupported)) {
+                    parse(parser);
+                }
+            }
+        } catch (IOException | JsonParsingException e) {
+            throw new IllegalDataException(e);
         }
         return getDataSet();
