[ 
https://issues.apache.org/jira/browse/LANG-775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Benson resolved LANG-775.
------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2

rev 1203429
                
> TypeUtils.getTypeArguments() misses type arguments for partially-assigned 
> classes
> ---------------------------------------------------------------------------------
>
>                 Key: LANG-775
>                 URL: https://issues.apache.org/jira/browse/LANG-775
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.reflect.*
>    Affects Versions: 3.1
>            Reporter: Matt Benson
>            Assignee: Matt Benson
>             Fix For: 3.2
>
>
> failing test code to add to TypeUtilsTest.testGetTypeArguments():
> {code}
> typeVarAssigns = TypeUtils.getTypeArguments(Other.class, This.class);
> Assert.assertEquals(2, typeVarAssigns.size());
> Assert.assertEquals(String.class, 
> typeVarAssigns.get(This.class.getTypeParameters()[0]));
> Assert.assertEquals(Other.class.getTypeParameters()[0], 
> typeVarAssigns.get(This.class.getTypeParameters()[1]));
> {code}
> These should pass based on:
> {code}
> public interface This<K, V> {
> }
> public class Other<T> implements This<String, T> {
> }
> {code}
> This case fails because the current code ignores the Other class due to its 
> specifying its own type variables, which is obviously incorrect.  This report 
> is extrapolated from an offline report received by Hen.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to