From f001630b59013f10e4e1ba9cb1823273e7273c39 Mon Sep 17 00:00:00 2001
From: idk <hankhill19580@gmail.com>
Date: Tue, 25 Oct 2022 20:17:43 -0400
Subject: [PATCH] un-do changes for passing additional arguments to REG QUERY

---
 .../src/net/i2p/apps/systray/UrlLauncher.java | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java b/apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java
index a3cbc54bb1..2d294aea66 100644
--- a/apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java
+++ b/apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java
@@ -220,18 +220,6 @@ public String getDefaultWindowsBrowser(String url) {
         return "C:\\Program Files\\Internet Explorer\\iexplore.exe";
     }
 
-    /**
-     * obtains a value matching a key contained in the windows registry at a path
-     * represented by hkeyquery
-     *
-     * @param hkeyquery registry entry to ask for.
-     * @param key key to retrieve value from
-     * @return either a registry "Default" value or null if one does not exist/is empty
-     * @since 2.0.0
-     */
-    private String registryQuery(String hkeyquery, String key) {
-        return registryQuery(hkeyquery, key, null);
-    }
     /**
      * obtains a value matching a key contained in the windows registry at a path
      * represented by hkeyquery
@@ -242,14 +230,11 @@ private String registryQuery(String hkeyquery, String key) {
      * @return either a registry "Default" value or null if one does not exist/is empty
      * @since 2.0.0
      */
-    private String registryQuery(String hkeyquery, String key, String[] additionalArgs) {
+    private String registryQuery(String hkeyquery, String key) {
         try {
             // Get registry where we find the default browser
             String[] cmd = {"REG", "QUERY", hkeyquery};
-            ArrayList<String> cmdList = new ArrayList<String>(Arrays.asList(cmd));
-            if (additionalArgs != null)
-                cmdList.addAll(Arrays.asList(additionalArgs));
-            Process process = Runtime.getRuntime().exec(cmdList.toArray(cmd));
+            Process process = Runtime.getRuntime().exec(cmd);
             Scanner kb = new Scanner(process.getInputStream());
             while (kb.hasNextLine()) {
                 String line = kb.nextLine().trim();