Amichai Rothman created ARIES-2112:
--------------------------------------

             Summary: ClassCastException on JDK 9+
                 Key: ARIES-2112
                 URL: https://issues.apache.org/jira/browse/ARIES-2112
             Project: Aries
          Issue Type: Bug
          Components: Remote Service Admin
    Affects Versions: rsa-1.16.1
            Reporter: Amichai Rothman


Arrays.asList().toArray() returned type has changed from String[] to Object[] 
due to [https://bugs.openjdk.org/browse/JDK-6260652,] causing 
ClassCastException on JDK9+ (and caught by the unit tests :) ).

 
java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class 
[Ljava.lang.String; ([Ljava.lang.Object; and [Ljava.lang.String; are in module 
java.base of loader 'bootstrap')
 
at 
org.apache.aries.rsa.eapub.EventAdminHelperTest$1.answer(EventAdminHelperTest.java:89)
at org.easymock.internal.Result.answer(Result.java:106)
at org.easymock.internal.ReplayState.invokeInner(ReplayState.java:60)
at org.easymock.internal.ReplayState.invoke(ReplayState.java:46)
at 
org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:40)
at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:94)
at com.sun.proxy.$Proxy10.postEvent(Unknown Source)
at 
org.apache.aries.rsa.eapub.EventAdminHelper.notifyEventAdmins(EventAdminHelper.java:103)
at 
org.apache.aries.rsa.eapub.EventAdminHelper.remoteAdminEvent(EventAdminHelper.java:86)
at 
org.apache.aries.rsa.eapub.EventAdminHelperTest.testPublishNotification(EventAdminHelperTest.java:122)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to