Skip to content

Commit f001630

Browse files
committed
un-do changes for passing additional arguments to REG QUERY
1 parent 2389ab5 commit f001630

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java

+2-17
Original file line numberDiff line numberDiff line change
@@ -220,18 +220,6 @@ public String getDefaultWindowsBrowser(String url) {
220220
return "C:\\Program Files\\Internet Explorer\\iexplore.exe";
221221
}
222222

223-
/**
224-
* obtains a value matching a key contained in the windows registry at a path
225-
* represented by hkeyquery
226-
*
227-
* @param hkeyquery registry entry to ask for.
228-
* @param key key to retrieve value from
229-
* @return either a registry "Default" value or null if one does not exist/is empty
230-
* @since 2.0.0
231-
*/
232-
private String registryQuery(String hkeyquery, String key) {
233-
return registryQuery(hkeyquery, key, null);
234-
}
235223
/**
236224
* obtains a value matching a key contained in the windows registry at a path
237225
* represented by hkeyquery
@@ -242,14 +230,11 @@ private String registryQuery(String hkeyquery, String key) {
242230
* @return either a registry "Default" value or null if one does not exist/is empty
243231
* @since 2.0.0
244232
*/
245-
private String registryQuery(String hkeyquery, String key, String[] additionalArgs) {
233+
private String registryQuery(String hkeyquery, String key) {
246234
try {
247235
// Get registry where we find the default browser
248236
String[] cmd = {"REG", "QUERY", hkeyquery};
249-
ArrayList<String> cmdList = new ArrayList<String>(Arrays.asList(cmd));
250-
if (additionalArgs != null)
251-
cmdList.addAll(Arrays.asList(additionalArgs));
252-
Process process = Runtime.getRuntime().exec(cmdList.toArray(cmd));
237+
Process process = Runtime.getRuntime().exec(cmd);
253238
Scanner kb = new Scanner(process.getInputStream());
254239
while (kb.hasNextLine()) {
255240
String line = kb.nextLine().trim();

0 commit comments

Comments
 (0)