simplified code
[instantlauncher.git] / 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) {