-
Notifications
You must be signed in to change notification settings - Fork 103
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 module-info.java #104
Add module-info.java #104
Conversation
# Conflicts: # .travis.yml # build.gradle
ResourceLoader.java solves the following problems. Without the ResourceLoader class, the above problem is likely to recur in various applications using zxcvbn4j. |
The linked issue was caused by the fact that you used to use However, even this is not "correct", see linked StackOverflow Post. I would encourage you to just retest the new implementation, as it is the way resource loading is intended. Edit: I believe you could even do a simple |
To simplify review and not delay things further, I've re-added the ResourceLoader (added the described way of loading a resource as a first step, though). Note that the resource URL still needs to be absolute (tbh I wonder how it ever worked in the first place 🙈). |
@overheadhunter Thank you! I will prepare to release 1.6.0 |
@overheadhunter I got an error in validation after publishing to sonatype. It will take some time to release it. |
@overheadhunter Now I released zxcvbn 1.6.0. Please check Java 9 Modules. |
@vvatanabe Works like a charm, thank you very much! |
This adds a
module-info.java
and fixes #103.Note there are two unexpected but necessary changes:
Due to stricter access control mechanisms in modular apps, I had to fix resource loading, which used to facilitate classloader. However, this is not recommended and breaks easily in different scenarios. See this SO post for an explanation. Please take care to review this particular change thoroughly!Edit: Reverted due to concerns mentioned belowFuthermore, it is worth pointing out that the line
exports com.nulabinc.zxcvbn.matchers;
inside of the module-info is only necessary due to the fact thatcom.nulabinc.zxcvbn.matchers.Match
is exposed public API. If this class can be moved to the top-level package, this line can be removed. So from a library user's perspective, bothcom.nulabinc.zxcvbn.matchers.*
andcom.nulabinc.zxcvbn.guesses.*
will be hidden.