johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: ClassCastException for new mapper testcase when working with parameterized types
Date Sat, 12 Jul 2014 20:49:10 GMT
Yeah, openwebbeans has some nice code for it.

Ill check tomorrow after having applied your patch (can you do one for the
tests please?)
Le 12 juil. 2014 16:17, "Hendrik Dev" <hendrikdev22@gmail.com> a écrit :

> Hi,
>
> can't get this testcase working:
>
> https://github.com/salyh/fleece_master/blob/09a31c5f174de5ac3e86b14cfb5ae8628af66e97/fleece-mapper/src/test/java/org/apache/fleece/mapper/MapperEnhancedTests.java
> (Line 91-124)
>
> The problem is obviously here:
>
> https://github.com/salyh/fleece_master/blob/09a31c5f174de5ac3e86b14cfb5ae8628af66e97/fleece-mapper/src/main/java/org/apache/fleece/mapper/Mapper.java
> (Line 470-471)
>
> The exception is
>
> java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:3047)
> at org.apache.fleece.mapper.Mapper.buildObject(Mapper.java:472)
> at org.apache.fleece.mapper.Mapper.toObject(Mapper.java:514)
> at org.apache.fleece.mapper.Mapper.buildObject(Mapper.java:495)
> at org.apache.fleece.mapper.Mapper.toObject(Mapper.java:514)
> at org.apache.fleece.mapper.Mapper.buildObject(Mapper.java:495)
> at org.apache.fleece.mapper.Mapper.mapObject(Mapper.java:371)
> at org.apache.fleece.mapper.Mapper.readObject(Mapper.java:361)
> at
> org.apache.fleece.mapper.MapperEnhancedTests.writeTestclass(MapperEnhancedTests.java:123)
> ...
>
> Any clues how to handle the parameterized types correctly?
>
> Thanks
> Hendrik
>
> --
> Hendrik Saly (salyh, hendrikdev22)
> @hendrikdev22
> PGP: 0x22D7F6EC
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message