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/13 19:06:00 UTC
[jira] [Created] (TEXT-186) StringSubstitutor constructor with map
argument throws NPE on 1.9 with null argument
Gautam Korlam created TEXT-186:
----------------------------------
Summary: StringSubstitutor constructor with map argument throws NPE on 1.9 with null argument
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
Fix For: 1.8
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)