Fix Desugar duplicating path for dumped classes.
When dumpDirectory (jdk.internal.lambda.dumpProxyClasses) is a relative path, Desugar was duplicating that path because it was resolving lambdaClass.getKey() (which contained already the the dumpDirectory path).
Fixed by ensuring dumpDirectory is always an absolute path.
RELNOTES: n/a
@@ -550,7 +550,7 @@ class Desugar {
private static Path createAndRegisterLambdaDumpDirectory() throws IOException {
String propertyValue = System.getProperty(LambdaClassMaker.LAMBDA_METAFACTORY_DUMPER_PROPERTY);
if (propertyValue != null) {
- return Paths.get(propertyValue);
+ return Paths.get(propertyValue).toAbsolutePath();
}
Path dumpDirectory = Files.createTempDirectory("lambdas");
