From 486aec60d124bfc1e10fce14d023f1e656969b56 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Fri, 17 Jan 2014 15:39:31 +0200 Subject: [PATCH] simplified code --- .../instantlauncher/FileAssociationManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java b/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java index 1c12eb8..3a00ce6 100755 --- a/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java +++ b/src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java @@ -32,16 +32,12 @@ public class FileAssociationManager { final String[] commands = extensionToApplication.get(fileExtension); - final String[] c = new String[commands.length]; - for (int i = 0; i < commands.length; i++) if (commands[i].equals(FILE_INDICATOR)) - c[i] = file.getAbsolutePath(); - else - c[i] = commands[i]; + commands[i] = file.getAbsolutePath(); try { - Runtime.getRuntime().exec(c); + Runtime.getRuntime().exec(commands); InstantLauncher.exitProgram(); } catch (final IOException e) { -- 2.20.1