Index: applications/editors/josm/plugins/native-password-manager/build.xml
===================================================================
--- applications/editors/josm/plugins/native-password-manager/build.xml	(revision 36209)
+++ applications/editors/josm/plugins/native-password-manager/build.xml	(revision 36211)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="18650"/>
+    <property name="plugin.main.version" value="18991"/>
     <property name="plugin.author" value="Paul Hartmann"/>
     <property name="plugin.class" value="org.openstreetmap.josm.plugins.npm.NPMPlugin"/>
Index: applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java	(revision 36209)
+++ applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/InitializationWizard.java	(revision 36211)
@@ -41,10 +41,8 @@
 
 import org.netbeans.spi.keyring.KeyringProvider;
-import org.openstreetmap.josm.data.oauth.OAuthToken;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.util.WindowGeometry;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.io.DefaultProxySelector;
-import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.io.auth.CredentialsAgentException;
 import org.openstreetmap.josm.io.auth.CredentialsManager;
@@ -56,5 +54,5 @@
 public class InitializationWizard extends JDialog {
 
-    protected boolean canceled = false;
+    protected boolean canceled;
     protected JButton btnCancel, btnBack, btnNext;
     protected Action nextAction, finishAction;
@@ -67,5 +65,6 @@
     
     public InitializationWizard() {
-        super(JOptionPane.getFrameForComponent(MainApplication.getMainFrame()), tr("Native password manager plugin"), ModalityType.DOCUMENT_MODAL);
+        super(JOptionPane.getFrameForComponent(MainApplication.getMainFrame()),
+                tr("Native password manager plugin"), ModalityType.DOCUMENT_MODAL);
         build();
         NPMType npm = detectNativePasswordManager();
@@ -146,6 +145,6 @@
         void onOkAction();
     }
-    
-    abstract private static class AbstractWizardPanel implements WizardPanel {
+
+    private abstract static class AbstractWizardPanel implements WizardPanel {
         
         /**
@@ -175,5 +174,5 @@
         }
 
-        abstract protected JPanel getContentPanel();
+        protected abstract JPanel getContentPanel();
     }
     
@@ -229,6 +228,6 @@
     private static class SelectionPanel extends AbstractWizardPanel implements ActionListener {
         
-        private NPMType type;
-        private InitializationWizard wizard;
+        private final NPMType type;
+        private final InitializationWizard wizard;
         
         private JRadioButton rbManage, rbPlain;
@@ -350,25 +349,11 @@
             
             CredentialsManager cm = CredentialsManager.getInstance();
-            
-            String server_username = Config.getPref().get("osm-server.username", null);
-            String server_password = Config.getPref().get("osm-server.password", null);
-            if (server_username != null || server_password != null) {
+
+            String proxyUsername = Config.getPref().get(DefaultProxySelector.PROXY_USER, null);
+            String proxyPassword = Config.getPref().get(DefaultProxySelector.PROXY_PASS, null);
+            String proxyHost = Config.getPref().get(DefaultProxySelector.PROXY_HTTP_HOST, null);
+            if (proxyUsername != null || proxyPassword != null) {
                 try {
-                    cm.store(RequestorType.SERVER, OsmApi.getOsmApi().getHost(), new PasswordAuthentication(string(server_username), toCharArray(server_password)));
-                    if (rbClear.isSelected()) {
-                        Config.getPref().put("osm-server.username", null);
-                        Config.getPref().put("osm-server.password", null);
-                    }
-                } catch (CredentialsAgentException ex) {
-                    Logging.error(ex);
-                }
-            }
-            
-            String proxy_username = Config.getPref().get(DefaultProxySelector.PROXY_USER, null);
-            String proxy_password = Config.getPref().get(DefaultProxySelector.PROXY_PASS, null);
-            String proxy_host = Config.getPref().get(DefaultProxySelector.PROXY_HTTP_HOST, null);
-            if (proxy_username != null || proxy_password != null) {
-                try {
-                    cm.store(RequestorType.PROXY, proxy_host, new PasswordAuthentication(string(proxy_username), toCharArray(proxy_password)));
+                    cm.store(RequestorType.PROXY, proxyHost, new PasswordAuthentication(string(proxyUsername), toCharArray(proxyPassword)));
                     if (rbClear.isSelected()) {
                         Config.getPref().put(DefaultProxySelector.PROXY_USER, null);
@@ -379,22 +364,8 @@
                 }
             }
-            
-            String oauth_key = Config.getPref().get("oauth.access-token.key", null);
-            String oauth_secret = Config.getPref().get("oauth.access-token.secret", null);
-            if (oauth_key != null || oauth_secret != null) {
-                try {
-                    cm.storeOAuthAccessToken(new OAuthToken(string(oauth_key), string(oauth_secret)));
-                    if (rbClear.isSelected()) {
-                        Config.getPref().put("oauth.access-token.key", null);
-                        Config.getPref().put("oauth.access-token.secret", null);
-                    }
-                } catch (CredentialsAgentException ex) {
-                    Logging.error(ex);
-                }
-            }
-        }
-    }
-
-    private final static String NPM = "Native Password Manager Plugin: ";
+        }
+    }
+
+    private static final String NPM = "Native Password Manager Plugin: ";
 
     private static NPMType detectNativePasswordManager() {
@@ -445,5 +416,5 @@
                     )
             ).applySafe(this);
-        } else if (!visible && isShowing()){
+        } else if (isShowing()){
             new WindowGeometry(this).remember(getClass().getName() + ".geometry");
         }
@@ -493,5 +464,6 @@
         public void actionPerformed(ActionEvent evt) {
             if (panelIndex <= 0)
-                throw new RuntimeException();
+                // Java 9 will let us pass the panelIndex by itself
+                throw new IndexOutOfBoundsException("Index out of range: " + panelIndex);
             panelIndex--;
             cardLayout.show(cardPanel, panels.get(panelIndex).getId());
Index: applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java	(revision 36209)
+++ applications/editors/josm/plugins/native-password-manager/src/org/openstreetmap/josm/plugins/npm/NPMCredentialsAgent.java	(revision 36211)
@@ -25,5 +25,4 @@
 import org.openstreetmap.josm.data.oauth.OAuth20Parameters;
 import org.openstreetmap.josm.data.oauth.OAuth20Token;
-import org.openstreetmap.josm.data.oauth.OAuthToken;
 import org.openstreetmap.josm.data.oauth.OAuthVersion;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
@@ -52,5 +51,5 @@
      */
     private final Map<RequestorType, PasswordAuthentication> credentialsCache = new EnumMap<>(RequestorType.class);
-    private OAuthToken oauthCache;
+
 
     /**
@@ -187,14 +186,4 @@
             credentialsCache.put(rt, new PasswordAuthentication(stringNotNull(username), password != null ? password : new char[0]));
         }
-    }
-
-    @Override
-    public OAuthToken lookupOAuthAccessToken() {
-        if (oauthCache != null)
-            return oauthCache;
-        String prolog = getOAuthDescriptor();
-        char[] key = getProvider().read(prolog+".key");
-        char[] secret = getProvider().read(prolog+".secret");
-        return new OAuthToken(stringNotNull(key), stringNotNull(secret));
     }
 
@@ -223,26 +212,4 @@
 
     @Override
-    public void storeOAuthAccessToken(OAuthToken oat) {
-        String key, secret;
-        if (oat == null) {
-            key = null;
-            secret = null;
-        } else {
-            key = oat.getKey();
-            secret = oat.getSecret();
-        }
-        String prolog = getOAuthDescriptor();
-        if (key == null || key.isEmpty() || secret == null || secret.isEmpty()) {
-            getProvider().delete(prolog+".key");
-            getProvider().delete(prolog+".secret");
-            oauthCache = null;
-        } else {
-            getProvider().save(prolog+".key", key.toCharArray(), tr("JOSM/OAuth/OSM API/Key"));
-            getProvider().save(prolog+".secret", secret.toCharArray(), tr("JOSM/OAuth/OSM API/Secret"));
-            oauthCache = new OAuthToken(key, secret);
-        }
-    }
-
-    @Override
     public void storeOAuthAccessToken(String host, IOAuthToken accessToken) {
         String prolog = getOAuthDescriptor();
Index: applications/editors/josm/plugins/sds/build.xml
===================================================================
--- applications/editors/josm/plugins/sds/build.xml	(revision 36209)
+++ applications/editors/josm/plugins/sds/build.xml	(revision 36211)
@@ -5,5 +5,5 @@
     <property name="commit.message" value=""/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="18650"/>
+    <property name="plugin.main.version" value="18991"/>
 
     <property name="plugin.author" value="Frederik Ramm"/>
Index: applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java
===================================================================
--- applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 36209)
+++ applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 36211)
@@ -13,5 +13,4 @@
 
 import org.openstreetmap.josm.data.oauth.IOAuthToken;
-import org.openstreetmap.josm.data.oauth.OAuthToken;
 import org.openstreetmap.josm.gui.io.CredentialDialog;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
@@ -83,19 +82,4 @@
     }
 
-    /**
-     * Lookup the current OAuth Access Token to access the OSM server. Replies null, if no
-     * Access Token is currently managed by this CredentialManager.
-     *
-     * @return the current OAuth Access Token to access the OSM server.
-     */
-    @Override
-    public OAuthToken lookupOAuthAccessToken() {
-        String accessTokenKey = Config.getPref().get("oauth.access-token.key", null);
-        String accessTokenSecret = Config.getPref().get("oauth.access-token.secret", null);
-        if (accessTokenKey == null && accessTokenSecret == null)
-            return null;
-        return new OAuthToken(accessTokenKey, accessTokenSecret);
-    }
-
     @Override
     public IOAuthToken lookupOAuthAccessToken(String host) {
@@ -125,9 +109,4 @@
     public String getSaveUsernameAndPasswordCheckboxText() {
         return tr("Save user and password (unencrypted)");
-    }
-
-    @Override
-    public void storeOAuthAccessToken(OAuthToken accessToken) {
-        // no-op
     }
 
