Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 30737)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 30738)
@@ -30,5 +30,6 @@
 
 /**
- * @author dmuecke Data import for TangoGPS file format.
+ * Data import for TangoGPS file format.
+ * @author dmuecke
  */
 public class TangoGPS extends FileImporter {
@@ -40,6 +41,5 @@
     /**
      * @author cbrill
-     * This function imports data from file and adds trackpoints
-     *         to a layer.
+     * This function imports data from file and adds trackpoints to a layer.
      * Read a log file from TangoGPS. These are simple text files in the
      * form: <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>
@@ -53,9 +53,8 @@
         int failure = 0;
 
-        BufferedReader rd = null;
-        try {
+        try (
             InputStream source = new FileInputStream(file);
-            rd = new BufferedReader(new InputStreamReader(source));
-
+            BufferedReader rd = new BufferedReader(new InputStreamReader(source));
+         ) {
             String line;
             while ((line = rd.readLine()) != null) {
@@ -72,5 +71,5 @@
                         imported++;
                     } catch (NumberFormatException e) {
-                        e.printStackTrace();
+                        Main.error(e);
                     }
                 }
@@ -92,8 +91,4 @@
             }
             showInfobox(imported,failure);
-        } finally {
-            if (rd != null) {
-                rd.close();
-            }
         }
     }
@@ -106,6 +101,5 @@
         if (lineElements.length < 2)
             return null;
-        return new LatLon(parseCoord(lineElements[0]),
-                parseCoord(lineElements[1]));
+        return new LatLon(parseCoord(lineElements[0]), parseCoord(lineElements[1]));
     }
 
@@ -118,5 +112,3 @@
         }
     }
-
-
 }
