Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the same FileSystem as the outputDir. #71

Merged
merged 1 commit into from
Dec 15, 2015
Merged

Use the same FileSystem as the outputDir. #71

merged 1 commit into from
Dec 15, 2015

Conversation

JakeWharton
Copy link
Contributor

Otherwise java.nio.file.ProviderMismatchException can be thrown if it differs from FileSystems.getDefault() (which was implicitly used by Paths.get()).

Otherwise `java.nio.file.ProviderMismatchException` can be thrown if it differs from `FileSystems.getDefault()` (which was implicitly used by `Paths.get()`).
@JakeWharton
Copy link
Contributor Author

Actually it looks like there's other path assumption problems in Retrolambda.java as well.

@luontola
Copy link
Owner

In what situation would this result in Retrolambda not working? I'd like to reproduce it.

@JakeWharton
Copy link
Contributor Author

I was loading class files directly from a pre-existing jar by using FileSystem.newFileSystem to mount it as a zip.

@JakeWharton
Copy link
Contributor Author

I'll note that this is not a comprehensive fix as I gave up and just extracted the jar.

@luontola
Copy link
Owner

How were you invoking Retrolambda? AFAIK, it shouldn't be possible to pass in a custom file system even in you call net.orfjackal.retrolambda.Retrolambda#run programmatically.

@JakeWharton
Copy link
Contributor Author

Nothing is final or hidden so I just subclassed Config and return what I want. Ideally there would be a nice API on which the CLI was built for programmatic use. I'm scripting a conversion of Java 8 libraries to Java 6 in our tooling so that updates of those libraries are easy.

@luontola
Copy link
Owner

OK. Such an API could also be used for implementing #44.

luontola added a commit that referenced this pull request Dec 15, 2015
Use the same FileSystem as the outputDir.
@luontola luontola merged commit 689240e into luontola:master Dec 15, 2015
@luontola
Copy link
Owner

This is included in Retrolambda 2.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants