Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

FileBackedFingerprintRepository throws NPE if fingerPrintFile has no parent Dir #50

Closed
rain-on opened this issue Mar 2, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@rain-on
Copy link

rain-on commented Mar 2, 2020

When attempt to create a FileBackedFingerprintRepository, if the supplied path is a simple filename (eg Path.of("file.tmp"), it effectively has no parent directory, and thus the call to createDirectories() (on line 39) is invoked with a 'null' parameter, resulting in an NPE.

Current workaround is to ensure it the FileBackedFingerprintRepository is instantiated with an absolutePath

@atoulme atoulme added the bug Something isn't working label Mar 2, 2020
atoulme added a commit that referenced this issue Mar 2, 2020
@atoulme
Copy link
Member

atoulme commented Mar 2, 2020

Sure thing. Note this means the path is relative to the current Java working directory, so an absolute path is still preferred imo. I have fixed the issue with the commit above, please review.

@atoulme atoulme closed this as completed Mar 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants