Index: applications/editors/josm/plugins/poly/src/poly/PolyExporter.java
===================================================================
--- applications/editors/josm/plugins/poly/src/poly/PolyExporter.java	(revision 34965)
+++ applications/editors/josm/plugins/poly/src/poly/PolyExporter.java	(revision 34966)
@@ -4,7 +4,7 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.BufferedWriter;
 import java.io.File;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
@@ -43,5 +43,5 @@
                 throw new IOException(tr("Data contains unclosed ways."));
             }
-            try (BufferedWriter writer = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8)) {
+            try (PrintWriter writer = new PrintWriter(Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8))) {
                 DataSet ds = ((OsmDataLayer) layer).getDataSet();
                 HashSet<Way> written = new HashSet<>();
@@ -56,5 +56,5 @@
                     if (rel.isMultipolygon()) {
                         if (!firstFile) {
-                            writer.newLine();
+                            writer.println();
                         }
                         writeRelation(writer, fileName, rel, written);
@@ -64,5 +64,5 @@
                 
                 if (firstFile) {
-                    writer.write(fileName);
+                    writer.println(fileName);
                 }
                 int counter = 1;
@@ -72,16 +72,14 @@
                     }
                 }
-                writer.write("END");
-                writer.newLine();
+                writer.println("END");
             }
         }
     }
 
-    private static void writeRelation(BufferedWriter writer, String fileName, Relation rel, Set<Way> written) throws IOException {
+    private static void writeRelation(PrintWriter writer, String fileName, Relation rel, Set<Way> written) {
         String polygonName = fileName;
         if (rel.getName() != null)
             polygonName = rel.getName();
-        writer.write(polygonName);
-        writer.newLine();
+        writer.println(polygonName);
         int counter = 1;
         for (RelationMember rm: rel.getMembers()) {
@@ -96,18 +94,15 @@
     }
 
-    private static int writeWay(BufferedWriter writer, Way w, int counter) throws IOException {
+    private static int writeWay(PrintWriter writer, Way w, int counter) {
         String name = w.getName();
         if (name == null) {
             name = String.valueOf(counter++);
         } 
-        writer.write(name);
-        writer.newLine();
+        writer.println(name);
 
         for (Node n : w.getNodes()) {
-            writer.write(String.format(Locale.ENGLISH, "   %f   %f", n.getCoor().lon(), n.getCoor().lat()));
-            writer.newLine();
+            writer.println(String.format(Locale.ENGLISH, "   %f   %f", n.getCoor().lon(), n.getCoor().lat()));
         }
-        writer.write("END");
-        writer.newLine();
+        writer.println("END");
         return counter;
     }
