mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: Possible NPE in StringHelper (#1092)
This commit is contained in:
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];
|
||||
|
||||
Reference in New Issue
Block a user