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

Add converter for java.nio.Path #909

Closed
jpraet opened this issue Mar 17, 2023 · 1 comment · Fixed by #910
Closed

Add converter for java.nio.Path #909

jpraet opened this issue Mar 17, 2023 · 1 comment · Fixed by #910

Comments

@jpraet
Copy link
Contributor

jpraet commented Mar 17, 2023

I initially thought java.nio.Path would be supported out-of-the-box, given the automatic fallback to a static .of() method that takes a String argument.

But it does not work:
SRCFG02007: No Converter registered for interface java.nio.file.Path

It's probably because https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Path.html#of(java.lang.String,java.lang.String...) takes the additional String... vararg argument.

I think the usecase of injecting a java.nio.Path value may be common enough to warrant an out-of-the-box converter?

@radcortez
Copy link
Member

We could.

Would you like to submit a PR with it? :)

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 a pull request may close this issue.

2 participants