simplified code
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 17 Jan 2014 13:39:31 +0000 (15:39 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 17 Jan 2014 13:39:31 +0000 (15:39 +0200)
src/main/java/eu/svjatoslav/instantlauncher/FileAssociationManager.java

index 1c12eb8..3a00ce6 100755 (executable)
@@ -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) {