You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gautam Korlam (Jira)" <ji...@apache.org> on 2020/08/14 07:33:00 UTC

[jira] [Closed] (TEXT-186) StringSubstitutor map constructor throws NPE on 1.9 with null map

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

Gautam Korlam closed TEXT-186.
------------------------------

Thank You!

> StringSubstitutor map constructor throws NPE on 1.9 with null map
> -----------------------------------------------------------------
>
>                 Key: TEXT-186
>                 URL: https://issues.apache.org/jira/browse/TEXT-186
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.9, 1.9.1
>            Reporter: Gautam Korlam
>            Priority: Major
>             Fix For: 1.9.1
>
>
> Steps to reproduce
>  
> Add a test to StringSubstitutorTest
> {code:java}
>     @Test
>     public void testConstructorNullMap() {
>         Map<String, Object> parameters = null;
>         final StringSubstitutor s = new StringSubstitutor(parameters, "prefix", "suffix");
>     }
> {code}
>  
> Test passes on 1.8. Fails on 1.9 . According to the javadoc, the map value is nullable - [https://github.com/apache/commons-text/blob/master/src/main/java/org/apache/commons/text/StringSubstitutor.java#L445]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)