Merge branch 'master' of https://github.com/wala/WALA
This commit is contained in:
commit
b33e7bce43
|
@ -43,7 +43,9 @@ import com.ibm.wala.util.io.TemporaryFile;
|
|||
public class Java7CallGraphTest extends DynamicCallGraphTestBase {
|
||||
|
||||
@Test public void testOcamlHelloHash() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException, ClassNotFoundException, InvalidClassFileException, FailureException, SecurityException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InterruptedException {
|
||||
testOCamlJar("hello_hash.jar");
|
||||
if (!"True".equals(System.getenv("APPVEYOR"))) {
|
||||
testOCamlJar("hello_hash.jar");
|
||||
}
|
||||
}
|
||||
|
||||
private void testOCamlJar(String jarFile, String... args) throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException, ClassNotFoundException, InvalidClassFileException, FailureException, SecurityException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InterruptedException {
|
||||
|
|
|
@ -24,6 +24,5 @@ Export-Package: com.ibm.wala.dataflow.graph,
|
|||
com.ibm.wala.util.processes,
|
||||
com.ibm.wala.util.tables,
|
||||
com.ibm.wala.viz
|
||||
Bundle-ClassPath: walaUtil.jar
|
||||
Bundle-Vendor: IBM
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
walaUtil.jar
|
||||
source.walaUtil.jar = src/
|
||||
.
|
||||
jars.compile.order = .
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
|
|
|
@ -15,25 +15,27 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class TemporaryFile {
|
||||
|
||||
private final static String outputDir;
|
||||
private final static Path outputDir;
|
||||
|
||||
static {
|
||||
String dir = System.getProperty("java.io.tmpdir");
|
||||
|
||||
while (dir.endsWith(File.separator))
|
||||
dir = dir.substring(0, dir.length()-1);
|
||||
|
||||
dir = dir + File.separator;
|
||||
|
||||
outputDir = dir;
|
||||
try {
|
||||
outputDir = Files.createTempDirectory("wala");
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static File urlToFile(String fileName, URL input) throws IOException {
|
||||
File F = new File(outputDir + File.separator + fileName);
|
||||
return urlToFile(F , input);
|
||||
if (input == null) {
|
||||
throw new NullPointerException("input == null");
|
||||
}
|
||||
Path filePath = outputDir.resolve(fileName);
|
||||
return urlToFile(filePath.toFile(), input);
|
||||
}
|
||||
|
||||
public static File urlToFile(File F, URL input) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue