Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java	(revision 32701)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java	(revision 32702)
@@ -4,13 +4,9 @@
 import java.net.Authenticator.RequestorType;
 import java.net.HttpURLConnection;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
 
 import org.openstreetmap.josm.io.auth.CredentialsAgentException;
 import org.openstreetmap.josm.io.auth.CredentialsAgentResponse;
-import org.openstreetmap.josm.tools.Base64;
 
 /**
@@ -64,9 +60,8 @@
      */
     protected void addBasicAuthorizationHeader(HttpURLConnection con) throws SdsTransferException {
-        CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
         CredentialsAgentResponse response;
         String token;
         try {
-                response = credAgent.getCredentials(RequestorType.SERVER, con.getURL().getHost(), false /* don't know yet whether the credentials will succeed */);
+            response = credAgent.getCredentials(RequestorType.SERVER, con.getURL().getHost(), false /* don't know yet whether the credentials will succeed */);
         } catch (CredentialsAgentException e) {
             throw new SdsTransferException(e);
@@ -81,10 +76,5 @@
             String password = response.getPassword() == null ? "" : String.valueOf(response.getPassword());
             token = username + ":" + password;
-            try {
-                ByteBuffer bytes = encoder.encode(CharBuffer.wrap(token));
-                con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes));
-            } catch(CharacterCodingException e) {
-                throw new SdsTransferException(e);
-            }
+            con.addRequestProperty("Authorization", "Basic "+Base64.getEncoder().encodeToString(token.getBytes(StandardCharsets.UTF_8)));
         }
     }
