| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0d34688 commit 5a2208c
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -263,26 +263,44 @@ public java.util.List<? extends DJError> compile(java.util.List<? extends File> | |||
| 263 | 263 | } | |
| 264 | 264 | if (s.length()>0) { s = s.substring(1); } | |
| 265 | 265 | ||
| 266 | - String [] testCommand = new String[11]; | ||
| 267 | - testCommand[0] = "-hj"; | ||
| 268 | - testCommand[1] = "-info"; | ||
| 269 | - testCommand[2] = "-sp"; | ||
| 270 | - testCommand[4] = "-cp"; | ||
| 271 | - testCommand[5] = s; | ||
| 272 | - testCommand[6] = "-d"; | ||
| 273 | - testCommand[8] = "-w"; | ||
| 274 | - testCommand[9] = "-pp"; | ||
| 266 | + // System.out.println("-------------------------------------"); | ||
| 267 | + // System.out.println("-------------------------------------"); | ||
| 268 | + // System.out.println("files = "+files); | ||
| 269 | + // System.out.println("sourcePath = "+sourcePath); | ||
| 270 | + // System.out.println("-------------------------------------"); | ||
| 271 | + ArrayList<String> testCommand = new ArrayList<String>(); | ||
| 272 | + testCommand.add("-hj"); | ||
| 273 | + testCommand.add("-info"); | ||
| 274 | + testCommand.add("-sp"); | ||
| 275 | + int spIndex = testCommand.size(); | ||
| 276 | + testCommand.add("<sp filled in here>"); | ||
| 277 | + testCommand.add("-cp"); | ||
| 278 | + testCommand.add(s); | ||
| 279 | + testCommand.add("-d"); | ||
| 280 | + int destIndex = testCommand.size(); | ||
| 281 | + if (destination != null) { | ||
| 282 | + testCommand.add(destination.getAbsolutePath()); | ||
| 283 | + } | ||
| 284 | + else { | ||
| 285 | + testCommand.add("<dest dir filled in here>"); | ||
| 286 | + } | ||
| 287 | + testCommand.add("-w"); | ||
| 288 | + testCommand.add("-pp"); | ||
| 289 | + int sourceFileIndex = testCommand.size(); | ||
| 290 | + testCommand.add("<source file filled in here>"); | ||
| 275 | 291 | ||
| 276 | 292 | for(File next: files) { | |
| 277 | - testCommand[3] = next.getParentFile().getAbsolutePath(); | ||
| 278 | - testCommand[7] = next.getParentFile().getAbsolutePath(); | ||
| 279 | - testCommand[10] = next.getName(); | ||
| 293 | + testCommand.set(spIndex, next.getParentFile().getAbsolutePath()); | ||
| 294 | + if (destination == null) { | ||
| 295 | + testCommand.set(destIndex, next.getParentFile().getAbsolutePath()); | ||
| 296 | + } | ||
| 297 | + testCommand.set(sourceFileIndex, next.getName()); | ||
| 280 | 298 | ||
| 281 | - // for(String cmd: testCommand) System.out.print(" "+cmd); | ||
| 282 | - // System.out.println(); | ||
| 299 | + // for(String cmd: testCommand) System.out.print(" "+cmd); | ||
| 300 | + // System.out.println(); | ||
| 283 | 301 | ||
| 284 | 302 | try { | |
| 285 | - soot.Main.mainEntry(testCommand); | ||
| 303 | + soot.Main.mainEntry(testCommand.toArray(new String[testCommand.size()])); | ||
| 286 | 304 | } | |
| 287 | 305 | catch(Exception e) { | |
| 288 | 306 | e.printStackTrace(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments