### Eclipse Workspace Patch 1.0
#P josm
diff --git src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
index ba6938d..0b84320 100644
--- src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
+++ src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
@@ -6,6 +6,7 @@
 import java.awt.Component;
 import java.io.IOException;
 import java.net.HttpURLConnection;
+import java.net.URI;
 import java.net.URL;
 
 import javax.swing.JOptionPane;
@@ -85,7 +86,7 @@
     protected UserInfo getUserDetails() throws OsmOAuthAuthorizationException, XmlParsingException, OsmTransferException {
         boolean authenticatorEnabled = true;
         try {
-            URL url = new URL(apiUrl + "/0.6/user/details");
+            final URL url = URI.create(apiUrl + "/0.6/user/details").toURL();
             authenticatorEnabled = DefaultAuthenticator.getInstance().isEnabled();
             DefaultAuthenticator.getInstance().setEnabled(false);
 
@@ -97,19 +98,22 @@
             }
 
             final String oauthKey = getAuthKey();
-            if (connection.getResponse().getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
-                throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,
+            if (connection.getResponse().getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
+                throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,
                         tr("Retrieving user details with Access Token Key ''{0}'' was rejected.",
                                 oauthKey), null);
+            }
 
-            if (connection.getResponse().getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN)
-                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN,
+            if (connection.getResponse().getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN) {
+                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN,
                         tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", oauthKey), null);
+            }
 
-            if (connection.getResponse().getResponseCode() != HttpURLConnection.HTTP_OK)
-                throw new OsmApiException(connection.getResponse().getResponseCode(),
+            if (connection.getResponse().getResponseCode() != HttpURLConnection.HTTP_OK) {
+                throw new OsmApiException(connection.getResponse().getResponseCode(),
                         connection.getResponse().getHeaderField("Error"), null);
-            Document d = XmlUtils.parseSafeDOM(connection.getResponse().getContent());
+            }
+            final Document d = XmlUtils.parseSafeDOM(connection.getResponse().getContent());
             return OsmServerUserInfoReader.buildFromXML(d);
         } catch (SAXException | ParserConfigurationException e) {
             throw new XmlParsingException(e);
@@ -233,15 +237,21 @@
     protected void realRun() throws SAXException, IOException, OsmTransferException {
         try {
             getProgressMonitor().indeterminateSubTask(tr("Retrieving user info..."));
-            UserInfo userInfo = getUserDetails();
-            if (canceled) return;
+            final UserInfo userInfo = getUserDetails();
+            if (canceled) {
+                return;
+            }
             notifySuccess(userInfo);
         } catch (OsmOAuthAuthorizationException e) {
-            if (canceled) return;
+            if (canceled) {
+                return;
+            }
             Logging.error(e);
             alertFailedSigning();
         } catch (OsmApiException e) {
-            if (canceled) return;
+            if (canceled) {
+                return;
+            }
             Logging.error(e);
             if (e.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) {
                 alertInternalError();
@@ -255,7 +265,9 @@
             }
             alertFailedConnection();
         } catch (OsmTransferException e) {
-            if (canceled) return;
+            if (canceled) {
+                return;
+            }
             Logging.error(e);
             alertFailedConnection();
         }
