Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7655

Calling Primitives.writeRawPrimitive with char raises java.lang.ClassCastException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.CR4
    • 9.0.0.CR3
    • Core
    • None
    • Hide

      With a simple unit test we can reproduce the bug

      TestBug.java
      public void testBug() throws IOException {
            BytesObjectOutput out = new BytesObjectOutput(10240, TestingUtil.extractGlobalMarshaller(cm));
            Primitives.writePrimitive('P', out, ID_CHAR_OBJ);
         }
      
      Show
      With a simple unit test we can reproduce the bug TestBug.java public void testBug() throws IOException { BytesObjectOutput out = new BytesObjectOutput(10240, TestingUtil.extractGlobalMarshaller(cm)); Primitives.writePrimitive( 'P' , out, ID_CHAR_OBJ); }
    • Low

    Description

      java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Integer

      at org.infinispan.marshall.core.Primitives.writeRawPrimitive(Primitives.java:89)
      at org.infinispan.marshall.core.Primitives.writePrimitive(Primitives.java:71)
      at org.infinispan.marshall.core.JBossMarshallerTest.testTT(JBossMarshallerTest.java:118)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      at org.testng.TestRunner.privateRun(TestRunner.java:767)
      at org.testng.TestRunner.run(TestRunner.java:617)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
      at org.testng.SuiteRunner.run(SuiteRunner.java:254)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
      at org.testng.TestNG.run(TestNG.java:1057)
      at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
      at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

      Attachments

        Issue Links

          Activity

            People

              karestig@redhat.com Katia Aresti
              karestig@redhat.com Katia Aresti
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: