FIX: Possible NPE in StringHelper (#1092)

This commit is contained in:
Roland Praml
2017-08-30 17:49:34 +12:00
committed by Rob Bygrave
parent 727d088577
commit 419ac2bf50
@@ -430,6 +430,9 @@ public class StringHelper {
* }</pre>
*/
public static String replaceStringMulti(String source, String[] match, String replace) {
if (source == null) {
return null;
}
return replaceStringMulti(source, match, replace, 30, 0, source.length());
}
@@ -443,7 +446,9 @@ public class StringHelper {
*/
public static String replaceStringMulti(String source, String[] match, String replace,
int additionalSize, int startPos, int endPos) {
if (source == null) {
return null;
}
int shortestMatch = match[0].length();
char[] match0 = new char[match.length];