eclipse-osgi-technology / jakartarest-osgi

Glassfish Jersey based implementation of the OSGi Jakarta RESTful Web Services Whiteboard specification
https://projects.eclipse.org/projects/technology.osgi-technology
Eclipse Public License 2.0
3 stars 5 forks source link

Further work on Generics support #42

Closed timothyjward closed 8 months ago

timothyjward commented 8 months ago

This PR relates to issue #39 which while technically "fixed" (the original problem no longer occurs in the main branch) was still possible to trigger with suitably complex generics.

I identified a missing test case where a Type Variable changes name in the generics declaration of an intermediate super class, and also where the Type Variable use is nested inside another generic declaration. Once added these tests showed up some further weaknesses which I have attempted to fix by establishing a context mapping of contract interface to implementing type and type to super type. This constrains the search through the type information and ensures that we only match type information that is relevant in the current context.

Please comment with any further test cases. @fipro78 @maho7791 @juergen-albert

juergen-albert commented 8 months ago

LGTM