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

Update Mockito to allow tests to pass in newer versions of Java #2871

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

caojohnny
Copy link
Contributor

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:

  • Java 8 (build passes)
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
  • Java 11 (build fails)
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
  • Java 12 (build fails)
openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.2+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 12.0.2+10, mixed mode, sharing)
  • Java 13 (build fails)
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.1+9, mixed mode, sharing)

@mdcfe mdcfe merged commit 59e30f0 into EssentialsX:2.x Dec 10, 2019
@mdcfe mdcfe added this to the 2.17.2 milestone Dec 12, 2019
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

Successfully merging this pull request may close these issues.

3 participants