Index: applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java
===================================================================
--- applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java	(revision 30737)
+++ applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamList.java	(revision 30738)
@@ -1,15 +1,15 @@
 /**
  *  Tracer2 - plug-in for JOSM to capture contours
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License along
  *  with this program; if not, write to the Free Software Foundation, Inc.,
@@ -28,9 +28,11 @@
 import java.util.List;
 
+import org.openstreetmap.josm.Main;
+
 public class ServerParamList {
     ArrayList<ServerParam> m_listServerParam = new ArrayList<>();
     ServerParam m_oActivParam = null;
     String m_strFilename;
-    
+
     public ServerParamList(String filename) {
         this.m_strFilename = filename;
@@ -41,8 +43,7 @@
         }
     }
-    
+
     public void load() {
-        try {
-            BufferedReader oReader = new BufferedReader(new InputStreamReader(new FileInputStream(m_strFilename), "UTF-8"));
+        try (BufferedReader oReader = new BufferedReader(new InputStreamReader(new FileInputStream(m_strFilename), "UTF-8"))) {
             StringBuilder oBuilder = new StringBuilder();
             String strLine;
@@ -54,14 +55,14 @@
                 }
             }
-            oReader.close();
         } catch (Exception e) {
         	loadDefault();
         }
     }
-    
+
     public void loadDefault() {
-        try {
+        try (
         	InputStream oIP = getClass().getResourceAsStream("/resources/serverParam.cfg");
             BufferedReader oReader = new BufferedReader(new InputStreamReader(oIP));
+        ) {
             StringBuilder oBuilder = new StringBuilder();
             String strLine;
@@ -73,28 +74,23 @@
                 }
             }
-            oReader.close();
         } catch (Exception e) {
-        	System.err.println("Tracer2 warning: can't load file " + m_strFilename);
-            //e.printStackTrace();
+        	Main.warn("Tracer2 warning: can't load file " + m_strFilename);
         }
     }
 
     public void save() {
-        try {
-            OutputStreamWriter oWriter = new OutputStreamWriter(new FileOutputStream(m_strFilename), "UTF-8");
+        try (OutputStreamWriter oWriter = new OutputStreamWriter(new FileOutputStream(m_strFilename), "UTF-8")) {
             for (ServerParam param : m_listServerParam) {
             	oWriter.write(param.serialize());
             }
-            oWriter.close();
         } catch (Exception e) {
-        	System.err.println("Tracer2 warning: can't save file " + m_strFilename);
-            //e.printStackTrace();
+        	Main.warn("Tracer2 warning: can't save file " + m_strFilename);
         }
     }
-    
+
     public List<ServerParam> getParamList() {
         return m_listServerParam;
     }
-    
+
     public ServerParam getActivParam() {
         return m_oActivParam;
@@ -105,5 +101,5 @@
     	}
     }
-    
+
     public List<ServerParam> getEnableParamList() {
     	List<ServerParam> listParam = new ArrayList<>();
@@ -115,13 +111,12 @@
     	return listParam;
     }
-    
+
     public void addParam(ServerParam param) {
     	m_listServerParam.add(param);
     }
-    
+
     public void removeParam(ServerParam param) {
     	param.setEnabled(false);
     	m_listServerParam.remove(param);
     }
-    
 }
