Index: /applications/editors/josm/plugins/openstreetbugs/.classpath
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/.classpath	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/.classpath	(revision 29736)
@@ -2,5 +2,5 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="build"/>
Index: /applications/editors/josm/plugins/openstreetbugs/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/.settings/org.eclipse.jdt.core.prefs	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/.settings/org.eclipse.jdt.core.prefs	(revision 29736)
@@ -1,4 +1,93 @@
-#Fri Oct 31 10:08:06 CET 2008
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
@@ -72,7 +161,10 @@
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
 org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java	(revision 29736)
@@ -273,16 +273,8 @@
     }
 
-    public void setLayer(OsbLayer layer) {
-        this.layer = layer;
-    }
-
     public DataSet getDataSet() {
         return dataSet;
     }
 
-    public void setDataSet(DataSet dataSet) {
-        this.dataSet = dataSet;
-    }
-
     public OsbDialog getDialog() {
         return dialog;
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java	(revision 29736)
@@ -54,5 +54,5 @@
             result = "ok";
         } else {
-            result = HttpUtils.post(uri, null, post, CHARSET);
+            result = HttpUtils.post(uri, post, CHARSET);
         }
 
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 29736)
@@ -64,5 +64,5 @@
 
         // download the data
-        String content = HttpUtils.get(uri, null, CHARSET);
+        String content = HttpUtils.get(uri, CHARSET);
 
         // clear dataset
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java	(revision 29736)
@@ -57,5 +57,5 @@
             result = "ok";
         } else {
-            result = HttpUtils.post(uri, null, post, CHARSET);
+            result = HttpUtils.post(uri, post, CHARSET);
         }
 
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java	(revision 29736)
@@ -65,5 +65,5 @@
             result = "ok 12345";
         } else {
-            result = HttpUtils.post(uri, null, post, CHARSET);
+            result = HttpUtils.post(uri, post, CHARSET);
         }
 
Index: plications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpResponse.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpResponse.java	(revision 29735)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/* Copyright (c) 2008, Henrik Niehaus
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its
- *    contributors may be used to endorse or promote products derived from this
- *    software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package org.openstreetmap.josm.plugins.osb.api.util;
-
-import java.util.List;
-import java.util.Map;
-
-public class HttpResponse {
-    private String content;
-
-    private Map<String, List<String>> header;
-
-    public HttpResponse(String content, Map<String, List<String>> header) {
-        super();
-        this.content = content;
-        this.header = header;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    public Map<String, List<String>> getHeader() {
-        return header;
-    }
-
-    public void setHeader(Map<String, List<String>> header) {
-        this.header = header;
-    }
-}
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 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/util/HttpUtils.java	(revision 29736)
@@ -28,6 +28,4 @@
 package org.openstreetmap.josm.plugins.osb.api.util;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -36,51 +34,19 @@
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
+
+import org.openstreetmap.josm.tools.Utils;
 
 public class HttpUtils {
-    public static String get(String url, Map<String, String> headers, String charset) throws IOException {
-        URL page = new URL(url);
-        URLConnection con = page.openConnection();
-        if(headers != null) {
-            for (Iterator<Entry<String,String>> iterator = headers.entrySet().iterator(); iterator.hasNext();) {
-                Entry<String, String> entry = iterator.next();
-                con.setRequestProperty(entry.getKey(), entry.getValue());
-            }
-        }
-
+    public static String get(String url, String charset) throws IOException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         int length = -1;
         byte[] b = new byte[1024];
-        InputStream in = con.getInputStream();
+        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);
-    }
-
-    public static HttpResponse getResponse(String url, Map<String, String> headers, String charset) throws IOException {
-        URL page = new URL(url);
-        URLConnection con = page.openConnection();
-        if(headers != null) {
-            for (Iterator<Entry<String,String>> iterator = headers.entrySet().iterator(); iterator.hasNext();) {
-                Entry<String, String> entry = iterator.next();
-                con.setRequestProperty(entry.getKey(), entry.getValue());
-            }
-        }
-
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        int length = -1;
-        byte[] b = new byte[1024];
-        InputStream in = con.getInputStream();
-        while( (length = in.read(b)) > 0 ) {
-            bos.write(b, 0, length);
-        }
-
-        HttpResponse response = new HttpResponse(new String(bos.toByteArray(), charset), con.getHeaderFields());
-        return response;
     }
 
@@ -88,5 +54,4 @@
      *
      * @param url
-     * @param headers
      * @param content the post body
      * @param responseCharset the expected charset of the response
@@ -94,15 +59,9 @@
      * @throws IOException
      */
-    public static String post(String url, Map<String, String> headers, String content, String responseCharset) throws IOException {
+    public static String post(String url, String content, String responseCharset) throws IOException {
         // initialize the connection
         URL page = new URL(url);
         URLConnection con = page.openConnection();
         con.setDoOutput(true);
-        if(headers != null) {
-            for (Iterator<Entry<String,String>> iterator = headers.entrySet().iterator(); iterator.hasNext();) {
-                Entry<String, String> entry = iterator.next();
-                con.setRequestProperty(entry.getKey(), entry.getValue());
-            }
-        }
 
         //send the post
@@ -119,54 +78,8 @@
             bos.write(b, 0, length);
         }
+        Utils.close(in);
+        Utils.close(os);
 
         return new String(bos.toByteArray(), responseCharset);
     }
-
-    /**
-     * Adds a parameter to a given URI
-     * @param uri
-     * @param param
-     * @param value
-     * @return
-     */
-    public static String addParameter(String uri, String param, String value) {
-        StringBuilder sb = new StringBuilder(uri);
-        if(uri.contains("?")) {
-            sb.append('&');
-        } else {
-            sb.append('?');
-        }
-
-        sb.append(param);
-        sb.append('=');
-        sb.append(value);
-
-        return sb.toString();
-    }
-
-    public static Map<String, List<String>> head(String url, Map<String, String> headers, String charset) throws IOException {
-        URL page = new URL(url);
-        URLConnection con = page.openConnection();
-        if(headers != null) {
-            for (Iterator<Entry<String,String>> iterator = headers.entrySet().iterator(); iterator.hasNext();) {
-                Entry<String, String> entry = iterator.next();
-                con.setRequestProperty(entry.getKey(), entry.getValue());
-            }
-        }
-
-        return con.getHeaderFields();
-    }
-
-    public static String getHeaderField(Map<String, List<String>> headers, String headerField) {
-        if(!headers.containsKey(headerField)) {
-            return null;
-        }
-
-        List<String> value = headers.get(headerField);
-        if(value.size() == 1) {
-            return value.get(0);
-        } else {
-            throw new RuntimeException(tr("Header contains several values and cannot be mapped to a single string"));
-        }
-    }
 }
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/dialogs/TextInputDialog.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/dialogs/TextInputDialog.java	(revision 29735)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/dialogs/TextInputDialog.java	(revision 29736)
@@ -49,4 +49,5 @@
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
+import javax.swing.WindowConstants;
 
 import org.openstreetmap.josm.gui.widgets.ComboBoxHistory;
@@ -153,5 +154,5 @@
             }
         }
-        setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
     }
 
