You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Wido den Hollander <wi...@widodh.nl> on 2015/08/05 15:41:12 UTC

[CLOUDSTACK-8708] Using Google Gson 2.3.1

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