You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Duncan Jones (JIRA)" <ji...@apache.org> on 2012/09/23 07:29:07 UTC

[jira] [Commented] (LANG-820) TypeUtils.normalizeUpperBounds broken?

    [ https://issues.apache.org/jira/browse/LANG-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461322#comment-13461322 ] 

Duncan Jones commented on LANG-820:
-----------------------------------

I don't believe this is a bug. The following unit test passes:
\\
{code}
@Test
public void testLang820() throws Exception {
    Type[] typeArray = {String.class, String.class};
    Type[] expectedArray = {String.class};
    Assert.assertArrayEquals(expectedArray, TypeUtils.normalizeUpperBounds(typeArray));
}
{code}


                
> TypeUtils.normalizeUpperBounds broken?
> --------------------------------------
>
>                 Key: LANG-820
>                 URL: https://issues.apache.org/jira/browse/LANG-820
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.reflect.*
>    Affects Versions: 3.0.1
>            Reporter: Shevek
>
> I looked at TypeUtils.normalizeUpperBounds, and I think (from code review) that:
> normalize(new Class[] { String.class, String.class }) == { String.class, String.class }
> which is not normalized. Didn't prove it with junit.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira