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

Failed to test maven project on JDK 11 #323

Open
rubenlop88 opened this issue Dec 18, 2018 · 2 comments
Open

Failed to test maven project on JDK 11 #323

rubenlop88 opened this issue Dec 18, 2018 · 2 comments
Labels

Comments

@rubenlop88
Copy link

rubenlop88 commented Dec 18, 2018

Fb-contrib version: 7.4.4.sb

After adding the missing dependency (see #322) the code compiles but the tests fail with the next error:

ERROR] Tests run: 219, Failures: 1, Errors: 0, Skipped: 154, Time elapsed: 1.805 s <<< FAILURE! - in TestSuite
[ERROR] setUp(com.mebigfatguy.fbcontrib.utils.RegisterUtilsTest)  Time elapsed: 1.006 s  <<< FAILURE!
org.mockito.exceptions.base.MockitoException: 

Mockito cannot mock this class: class edu.umd.cs.findbugs.visitclass.DismantleBytecode.

Mockito can only mock non-private & non-final classes.
If you're not sure why you're getting this error, please report to the mailing list.


Java               : 11
JVM vendor name    : Oracle Corporation
JVM vendor version : 11+28
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 11+28
JVM info           : mixed mode
OS name            : Mac OS X
OS version         : 10.14.1


Underlying exception : java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.mebigfatguy.fbcontrib.utils.RegisterUtilsTest.setUp(RegisterUtilsTest.java:87)
Caused by: java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.mebigfatguy.fbcontrib.utils.RegisterUtilsTest.setUp(RegisterUtilsTest.java:87)
Caused by: java.lang.IllegalArgumentException: Unknown Java version: 11
	at com.mebigfatguy.fbcontrib.utils.RegisterUtilsTest.setUp(RegisterUtilsTest.java:87)

@mebigfatguy
Copy link
Owner

i updated mockito to the latest, maybe that magically fixes it. Otherwise, patches welcome

@JuditKnoll
Copy link

With the changes in #477 and #478 I could successfully build it with Java versions 11, 17, 21 and 23, if I skipped the cpd, pmd and spotbugs checks. See the successful maven build gha run on the build-gha branch on my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants