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] [Closed] (JOHNZON-35) Mapper fails on short and byte array
Date Mon, 23 Feb 2015 21:44:13 GMT

     [ https://issues.apache.org/jira/browse/JOHNZON-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hendrik Saly closed JOHNZON-35.
-------------------------------

released with 0.6

> 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
>    Affects Versions: 0.1-incubating, 0.2-incubating, 0.5-incubating
>            Reporter: Hendrik Saly
>            Assignee: Hendrik Saly
>             Fix For: 0.6-incubating
>
>
> 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