Update Mockito to allow tests to pass in newer versions of Java #2871
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.
PR Synopsis
This PR updates the Mockito to the newest version available in Maven Central.
Rationale
When building EssentialsX on Java versions 11 and up, Maven tests fail with this error, stating that the Java version X is unknown to ByteBuddy.
The changes proposed in this PR updates Mockito, which now uses a newer version of ByteBuddy that supports the newer version of Java, thus allowing the tests to pass again.
Although it could be argued that EssentialsX targets specifically Java version 8 as specified through the
pom.xml
file, the changes proposed in this PR allows EssentialsX to support developers working on newer versions of Java while still retaining support for those working on older versions as well. While this contingent of developers remains small, I believe that the benefit of mitigating problems in the future far outweigh the present impacts discussed below.Impact
The impact on existing users and developers working on EssentialsX will be relatively low. Users will not notice any changes to EssentialsX. Developers will need to allow Maven to pull
mockito-core:3.2.0
from Maven Central; however, this is done automatically in the build process. There will be virtually no interference with the normal development process.These changes have a relatively low footprint. If bugs or problems arise in the future as a result of this change, it will be easy to revert with little to no impact to both users and developers.
Additional information
Java versions tested: