johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Dev <hendrikde...@gmail.com>
Subject ClassCastException for new mapper testcase when working with parameterized types
Date Sat, 12 Jul 2014 15:16:44 GMT
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
View raw message