You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/07/11 21:25:00 UTC

[jira] [Resolved] (LANG-1697) TypeUtils.getRawType() throws a NullPointerException on Wildcard GenericArrayType

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

Gary D. Gregory resolved LANG-1697.
-----------------------------------
    Fix Version/s: 3.13.0
       Resolution: Fixed

[~sparkaar] 

The code in git master (and snapshot builds) no longer throws an NPE in this case and returns null. See comments in the new test {*}org.apache.commons.lang3.reflect.TypeUtilsTest.testGetRawType_LANG_1697(){*}. This likely needs a bit more analysis such that either the method returns a non-null value or the Javadoc documents the behavior.

 

> TypeUtils.getRawType() throws a NullPointerException on Wildcard GenericArrayType
> ---------------------------------------------------------------------------------
>
>                 Key: LANG-1697
>                 URL: https://issues.apache.org/jira/browse/LANG-1697
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.reflect.*
>    Affects Versions: 3.12.0
>            Reporter: Jan Arne Sparka
>            Priority: Minor
>             Fix For: 3.13.0
>
>         Attachments: TestClass.java
>
>
> When calling TypeUtils.getRawType(Type type, Type assigningType), with a GenericArrayType of a WildcardType it crashes with a NPE.
> Minimum viable example attached.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)