Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are just some simple test fixes, mostly caught by IntelliJ's static analysis and SonarQube's static analysis. Below are the changes:
assertEquals.expectedshould be the first parameter withactualbeing the second parameter.throws IOExceptioninMcVersionLookupTest. As a note, all parameters and the return forvisitFileshould be marked NotNull (or NonNull if you migrate to JSpecify). An interface may state the throw in the function signature but in Java, if overriding a method, you cannot declare new or broader checked exceptions but you can declare fewer, and if your implementation doesn't throw, then you shouldn't include it in the override's signature (which is why IDEs like IntelliJ will tell you to remove it).Assertions.assertEqualswhile others just directly importedassertEquals. I changed all instances ofAssertions.assertEqualstoassertEqualsto keep things consistent.V1ModJsonParsingTests, the fieldprivate static Path testLocationwas converted to a local variable. It was never used outside ofsetupPaths.assertTruecheck was correctly changed toassertInstanceOfinV1ModJsonParsingTests.<>.This doesn't change any functionality, all tests run the same. This only corrects some semantics (like incorrect
assertEqualsorder) and cleans up code.