From 54cbd659596f1f7b028a4e7f14154504fbf02f3c Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Sat, 10 Oct 2015 01:48:36 -0400 Subject: [PATCH] Use the same FileSystem as the outputDir. Otherwise `java.nio.file.ProviderMismatchException` can be thrown if it differs from `FileSystems.getDefault()` (which was implicitly used by `Paths.get()`). --- .../java/net/orfjackal/retrolambda/files/OutputDirectory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrolambda/src/main/java/net/orfjackal/retrolambda/files/OutputDirectory.java b/retrolambda/src/main/java/net/orfjackal/retrolambda/files/OutputDirectory.java index 0fec8dc4..88cec60e 100644 --- a/retrolambda/src/main/java/net/orfjackal/retrolambda/files/OutputDirectory.java +++ b/retrolambda/src/main/java/net/orfjackal/retrolambda/files/OutputDirectory.java @@ -22,7 +22,7 @@ public void writeClass(byte[] bytecode) throws IOException { return; } ClassReader cr = new ClassReader(bytecode); - Path relativePath = Paths.get(cr.getClassName() + ".class"); + Path relativePath = outputDir.getFileSystem().getPath(cr.getClassName() + ".class"); writeFile(relativePath, bytecode); }