resty-gwt/resty-gwt — pull request #217 by bcourtine (2014-11-19 09:59:18+00:00)
Title: fix for issue #212.

This issue comes from the "getAnnotation()" method. This method is generic and works for classes and fields.

For the "JsonTypeInfo" and "JsonSubTypes" annotations, a custom method is required, because theses annotations must be searched not only in current class, but also on all the parent hierarchy (parent classes and interfaces).

For example, the 1.3.X version of RestyGWT had a "findAnnotation()" method for this purpose, that looked into the parent classes (but this method was incomplete: interface annotations were ignored).

In order to fix this issue, I completely changed the logic of the "JsonEncoderDecoderClassCreator#findJsonSubTypes" method. So, I this fix requires a serious code review to ensure this logic change did not introduce another regression.

This code change fixes the test introduced by @Koizumi85, and does not introduce a regression in other tests.