< prev index next >
test/jdk/lambda/separate/Compiler.java
Print this page
rev 14566 : 8044051: Test jdk/lambda/vm/InterfaceAccessFlagsTest.java gets IOException during compilation
Summary: create the gen-separate directory in the current directory to improve robustness
Reviewed-by: darcy
*** 1,7 ****
/*
! * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 52,62 ****
};
private static final AtomicInteger counter = new AtomicInteger();
private static final String targetDir =
System.getProperty("lambda.separate.targetDirectory",
! System.getProperty("java.io.tmpdir") + File.separator + "gen-separate");
private static final File root = new File(targetDir);
private static ConcurrentHashMap<String,File> cache =
new ConcurrentHashMap<>();
Set<Flags> flags;
--- 52,62 ----
};
private static final AtomicInteger counter = new AtomicInteger();
private static final String targetDir =
System.getProperty("lambda.separate.targetDirectory",
! "." + File.separator + "gen-separate");
private static final File root = new File(targetDir);
private static ConcurrentHashMap<String,File> cache =
new ConcurrentHashMap<>();
Set<Flags> flags;
*** 187,197 ****
destDir.mkdirs();
this.fm.setLocation(
StandardLocation.CLASS_OUTPUT, Arrays.asList(destDir));
} catch (IOException e) {
throw new RuntimeException(
! "IOException encountered during compilation");
}
Boolean result = ct.call();
if (result == Boolean.FALSE) {
throw new RuntimeException(
"Compilation failure in " + type.getName() + " unit");
--- 187,197 ----
destDir.mkdirs();
this.fm.setLocation(
StandardLocation.CLASS_OUTPUT, Arrays.asList(destDir));
} catch (IOException e) {
throw new RuntimeException(
! "IOException encountered during compilation: " + e.getMessage(), e);
}
Boolean result = ct.call();
if (result == Boolean.FALSE) {
throw new RuntimeException(
"Compilation failure in " + type.getName() + " unit");
< prev index next >