Index: applications/editors/josm/plugins/native-password-manager/build.xml
===================================================================
--- applications/editors/josm/plugins/native-password-manager/build.xml	(revision 36338)
+++ applications/editors/josm/plugins/native-password-manager/build.xml	(revision 36339)
@@ -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="18991"/>
+    <property name="plugin.main.version" value="19044"/>
     <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/pom.xml
===================================================================
--- applications/editors/josm/plugins/native-password-manager/pom.xml	(revision 36338)
+++ applications/editors/josm/plugins/native-password-manager/pom.xml	(revision 36339)
@@ -17,5 +17,5 @@
     <properties>
         <plugin.src.dir>src</plugin.src.dir>
-        <plugin.main.version>18991</plugin.main.version>
+        <plugin.main.version>19044</plugin.main.version>
         <plugin.author>Paul Hartmann</plugin.author>
         <plugin.class>org.openstreetmap.josm.plugins.npm.NPMPlugin</plugin.class>
Index: applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/kde/KWalletProvider.java
===================================================================
--- applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/kde/KWalletProvider.java	(revision 36338)
+++ applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/kde/KWalletProvider.java	(revision 36339)
@@ -62,5 +62,5 @@
     private char[] handler = "0".toCharArray();
     private boolean timeoutHappened = false;
-    private char[] defaultLocalWallet = "kdewallet".toCharArray();
+    private final char[] defaultLocalWallet = "kdewallet".toCharArray();
 
     @Override
@@ -100,5 +100,4 @@
                 warning("save action failed");
             }
-            return;
         }
         //throw new KwalletException("save");
@@ -113,5 +112,4 @@
                 warning("delete action failed");
             }
-            return;
         }
         //throw new KwalletException("delete");
@@ -122,5 +120,5 @@
             return false;
         }
-        handler = new String(handler).equals("")? "0".toCharArray() : handler;
+        handler = new String(handler).isEmpty() ? "0".toCharArray() : handler;
         CommandResult result = runCommand("isOpen",handler);          
         if(new String(result.retVal).equals("true")){
@@ -157,11 +155,22 @@
 
     private CommandResult runCommand(String command,char[]... commandArgs) {
+        CommandResult result = null;
+        for (int i : new int[] {6, 5, 0}) {
+            result = runCommandKdeVersion(i, command, commandArgs);
+            if (result.exitCode == 0 && !result.errVal.equals("Service 'org.kde.kwalletd" + (i != 0 ? i : "") + "' does not exist.")) {
+                break;
+            }
+        }
+        return result;
+    }
+
+    private CommandResult runCommandKdeVersion(int kdeVersion, String command, char[]... commandArgs) {
         String[] argv = new String[commandArgs.length+4];
         argv[0] = "qdbus";
-        argv[1] = "org.kde.kwalletd";
-        argv[2] = "/modules/kwalletd";
+        argv[1] = "org.kde.kwalletd" + (kdeVersion != 0 ? kdeVersion : "");
+        argv[2] = "/modules/kwalletd" + (kdeVersion != 0 ? kdeVersion : "");
         argv[3] = "org.kde.KWallet."+command;
         for (int i = 0; i < commandArgs.length; i++) {
-            //unfortunatelly I cannot pass char[] to the exec in any way - so this poses a security issue with passwords in String() !
+            //unfortunately I cannot pass char[] to the exec in any way - so this poses a security issue with passwords in String() !
             //TODO: find a way to avoid changing char[] into String
             argv[i+4] = new String(commandArgs[i]);
@@ -181,5 +190,5 @@
                 String line;
                 while((line = input.readLine()) != null) {
-                    if (!retVal.equals("")){
+                    if (!retVal.isEmpty()){
                         retVal = retVal.concat("\n");
                     }
@@ -191,5 +200,5 @@
                 String line;
                 while((line = input.readLine()) != null) {
-                    if (!errVal.equals("")){
+                    if (!errVal.isEmpty()){
                         errVal = errVal.concat("\n");
                     }
@@ -204,4 +213,5 @@
             }       
         } catch (InterruptedException ex) {
+            Thread.currentThread().interrupt();
             logger.log(Level.FINE,
                     "exception thrown while invoking the command \""+Arrays.toString(argv)+"\"",
@@ -224,10 +234,12 @@
   
     private static class CommandResult {
-        private int exitCode;
-        private char[] retVal;
+        private final int exitCode;
+        private final char[] retVal;
+        private final String errVal;
 
         public CommandResult(int exitCode, char[] retVal, String errVal) {
             this.exitCode = exitCode;
             this.retVal = retVal;
+            this.errVal = errVal;
         }                        
     }
