fleece-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 Sun, 13 Jul 2014 08:19:55 GMT
Pushed few changes.

Write uses now toString by default and read throw an exception saying
to register needed converters.

Side note: I aligned it on some other impl but not sure what means in
Json Map<List<Map>, X>



Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-13 1:08 GMT+02:00 Hendrik Dev <hendrikdev22@gmail.com>:
> test are already in the patches, just comment out
>
> On Sat, Jul 12, 2014 at 10:49 PM, Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
>> 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
>>>
>
>
>
> --
> Hendrik Saly (salyh, hendrikdev22)
> @hendrikdev22
> PGP: 0x22D7F6EC

Mime
View raw message