Uploaded image for project: 'Johnzon'
  1. Johnzon
  2. JOHNZON-178

Mapper#writeArray(new short[] {1,2}) blows up with a ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.8
    • 1.1.13
    • Mapper
    • None

    Description

      new MapperBuilder().build().writeArray(new short[] { 1, 2 }, baos);
       
      This currently blows up with
      java.lang.ClassCastException: [S cannot be cast to [Ljava.lang.Object;
          at org.apache.johnzon.mapper.Mapper.writeArray(Mapper.java:72)
          at org.apache.johnzon.mapper.MapperTest.writeArray(MapperTest.java:491)
         
      doing the same with new Short[] works like a charm...
       

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: