-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Steps to reproduce
JaCoCo version: 0.8.2
Operating system: "mac os x", version: "10.14.2", arch: "x86_64", family: "mac"
Tool integration: Maven 3.5.4
Java version: java version "1.8.0_181"
- Have docker installed.
- Use the reproducible code: https://github.com/chanjarster/jacoco-array-index-out-of-bounds-bug
- Maven command:
mvn clean install
Expected behaviour
Everything goes fine.
Actual behaviour
Maven result:
[ERROR] Failures:
[ERROR] me.chanjar.jacocobug.system.repo.DictionaryTypeRepositoryIT.testDictionaryTypeSort(me.chanjar.jacocobug.system.repo.DictionaryTypeRepositoryIT)
[INFO] Run 1: PASS
[ERROR] Run 2: DictionaryTypeRepositoryIT>AbstractTestNGSpringContextTests.run:180->testDictionaryTypeSort:31 » ArrayIndexOutOfBounds
Failsafe report:
testDictionaryTypeSort (me.chanjar.jacocobug.system.domain.DictionaryType@4057fa5f)
java.lang.ArrayIndexOutOfBoundsException: 23
at me.chanjar.jacocobug.system.domain.DictionaryType.setIsDataCenter(DictionaryType.java:100)
at me.chanjar.jacocobug.system.repo.DictionaryTypeRepository.createDictionaryType(DictionaryTypeRepository.java:42)
at me.chanjar.jacocobug.system.repo.DictionaryTypeRepository$$FastClassBySpringCGLIB$$9d92e7db.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at me.chanjar.jacocobug.system.repo.DictionaryTypeRepository$$EnhancerBySpringCGLIB$$7ea2705b.createDictionaryType(<generated>)
at me.chanjar.jacocobug.system.repo.DictionaryTypeRepositoryIT.testDictionaryTypeSort(DictionaryTypeRepositoryIT.java:31)
at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:180)
... Removed 32 stack frames
I suspect this bug related to reflection. If I comment out this line, no problem shows.