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

Tests: unnecessary checks for null #3

Open
jottinger opened this issue May 9, 2024 · 1 comment
Open

Tests: unnecessary checks for null #3

jottinger opened this issue May 9, 2024 · 1 comment

Comments

@jottinger
Copy link
Contributor

I added jacoco to a local fork to see about test coverage, and there are paths untested entirely (FileHandler.readFileMap() for example) or other paths that should not be accessible (PathHandler.getDirectoryPath() has a path where object is null, for example, and that can be replaced with Objects.requireNonNull(object;) if you're on a recent JDK.

@jottinger
Copy link
Contributor Author

This should be dependent on issue #5 being merged, as some of the tests want slightly different APIs; in particular, @Test void testHere() throws IOException { ... } wants to be replaced with @Test void testHere() { try { doStuffThatThrowsException(); } catch(IOException e) { fail(e); } } instead.

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

No branches or pull requests

1 participant