Index: applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java
===================================================================
--- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java	(revision 30416)
+++ applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java	(revision 30436)
@@ -42,9 +42,9 @@
         int length = -1;
         byte[] b = new byte[1024];
-        InputStream in = Utils.openURL(new URL(url));
-        while( (length = in.read(b)) > 0 ) {
-            bos.write(b, 0, length);
+        try (InputStream in = Utils.openURL(new URL(url))) {
+            while( (length = in.read(b)) > 0 ) {
+                bos.write(b, 0, length);
+            }
         }
-        Utils.close(in);
 
         return new String(bos.toByteArray(), charset);
@@ -66,7 +66,8 @@
 
         //send the post
-        OutputStream os = con.getOutputStream();
-        os.write(content.getBytes("UTF-8"));
-        os.flush();
+        try (OutputStream os = con.getOutputStream()) {
+            os.write(content.getBytes("UTF-8"));
+            os.flush();
+        }
 
         // read the response
@@ -74,10 +75,9 @@
         int length = -1;
         byte[] b = new byte[1024];
-        InputStream in = con.getInputStream();
-        while( (length = in.read(b)) > 0 ) {
-            bos.write(b, 0, length);
+        try (InputStream in = con.getInputStream()) {
+            while( (length = in.read(b)) > 0 ) {
+                bos.write(b, 0, length);
+            }
         }
-        Utils.close(in);
-        Utils.close(os);
 
         return new String(bos.toByteArray(), responseCharset);
