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

JMockit + Jacoco + JDK11 : ArrayIndexOutOfBound #688

Closed
jbennett2091 opened this issue Sep 1, 2020 · 3 comments
Closed

JMockit + Jacoco + JDK11 : ArrayIndexOutOfBound #688

jbennett2091 opened this issue Sep 1, 2020 · 3 comments

Comments

@jbennett2091
Copy link

jbennett2091 commented Sep 1, 2020

Please provide the following information:

  • Version of JMockit that was used: 1.49

  • Description of the problem or enhancement request:
    Enviroment that works JMockit+Jacoco+JDK8, when upgraded to JDK11 causes ArrayIndexOutOfBoundException during test execution. There have been some related defects raised around this issue (and possibly partially fixed?) (ArrayIndexOutOfBounds while creating mocks #664) (ArrayIndexOutOfBoundsException while initializing mocks #615) but I am still seeing issues in the latest versions. I am including a stripped down example to illustrate as that seems to have been requested

I am using:

  • Jmockit 1.49 (current latest)
  • Jacoco 0.8.5 (current latest)
  • AdoptOpenJDK 11.0.8 hotspot (in contrast to AdoptOpenJDK 1.8.0_262)
  • maven 3.6.3 (current latest)
  • surefire 3.0.0.M5 (current latest)
@jbennett2091
Copy link
Author

jbennett2091 commented Sep 1, 2020

As an experiment, I changed jacoco 0.8.5->0.8.3 and tests run. This may be a potential work-around for people affected pending an update (from jmockit?). Supposedly, the jacoco folks have switched to using 'condy' in their latest versions (e.g. 0.8.5), but earlier version (0.8.3) does not have condy. Per that discussion (#664) (#615), jmockit needs to properly support latest-jacoco-using-condy (I am paraphrasing based on what I think I read).

@rliesenfeld
Copy link
Member

Same as #615.

@madenu
Copy link

madenu commented Mar 16, 2022

FYI, I also get this ArrayIndexOutOfBoundsException with the following:

org.jmockit:jmockit:1.35
org.jacoco:org.jacoco.ant:0.8.7
org.jacoco:org.jacoco.core:0.8.7
OpenJDK Runtime Environment Microsoft-25199 (build 11.0.12+7)
Apache Ant(TM) version 1.10.12 compiled on October 13 2021

I will try the recommendations here and from #615

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

No branches or pull requests

3 participants