johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Saly (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JOHNZON-35) Mapper fails on short and byte array
Date Mon, 12 Jan 2015 09:13:34 GMT
Hendrik Saly created JOHNZON-35:
-----------------------------------

             Summary: Mapper fails on short and byte array
                 Key: JOHNZON-35
                 URL: https://issues.apache.org/jira/browse/JOHNZON-35
             Project: Johnzon
          Issue Type: Bug
          Components: Mapper
            Reporter: Hendrik Saly


short[] numShortA = new short[]{(short)1,(short)2,(short)3,(short)4,(short)5,(short)-7,(short)-8};

(same for byte[])

fails with a 
Exception in thread "main" java.lang.ClassCastException: Cannot cast java.lang.Short to java.lang.Integer
	at java.lang.Class.cast(Class.java:3176)
	at org.apache.johnzon.mapper.Mapper.writePrimitives(Mapper.java:110)
	at org.apache.johnzon.mapper.Mapper.writeItem(Mapper.java:421)
	at org.apache.johnzon.mapper.Mapper.writeValue(Mapper.java:395)
	at org.apache.johnzon.mapper.Mapper.doWriteObjectBody(Mapper.java:346)
	at org.apache.johnzon.mapper.Mapper.doWriteObject(Mapper.java:313)
	at org.apache.johnzon.mapper.Mapper.writeItem(Mapper.java:423)
	at org.apache.johnzon.mapper.Mapper.writeValue(Mapper.java:395)
	at org.apache.johnzon.mapper.Mapper.doWriteObjectBody(Mapper.java:346)
	at org.apache.johnzon.mapper.Mapper.doWriteObject(Mapper.java:313)
	at org.apache.johnzon.mapper.Mapper.doWriteHandlingNullObject(Mapper.java:292)
	at org.apache.johnzon.mapper.Mapper.writeObject(Mapper.java:269)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message