cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wido den Hollander <w...@widodh.nl>
Subject [CLOUDSTACK-8708] Using Google Gson 2.3.1
Date Wed, 05 Aug 2015 13:41:12 GMT
Hi,

While trying to merge PR 625 [0] which is CLOUDSTACK-8677 [1]
(Call-Home) a issue came up due to failing tests.

This feature requires Gson 2.3.1 and that breaks the test
com.cloud.agent.transport.RequestTest in "core".

We currently use Gson 1.7.2 which is from September 2011 (!).

This happens due to a reflection issue described in CLOUDSTACK-8708 [2].

I've been looking at if for 2 days now but I haven't been able to
resolve it properly. A nasty hack made the tests work, but that's still
not something I'm happy with.

Some help would be appreciated since my Reflection knowledge is not
sufficient to resolve this properly.

I already contacted Daan and he's going to look into it.

A very simple test is just to set the Google Gson version in pom.xml to
2.3.1 and run the test described above. If will fail due to a casting error:

java.lang.ClassCastException:
com.google.gson.internal.$Gson$Types$GenericArrayTypeImpl cannot be cast
to java.lang.Class

Wido

[0]: https://github.com/apache/cloudstack/pull/625
[1]: https://issues.apache.org/jira/browse/CLOUDSTACK-8677
[2]: https://issues.apache.org/jira/browse/CLOUDSTACK-8708

Mime
View raw message