Null check for CRLF characters removed logs
@@ -24,6 +24,9 @@ public class StringUtil {
private StringUtil() {}
public static String removeCRLFCharacters(String str) {
- return str.replace('\n', '_').replace('\r', '_');
+ if (str != null) {
+ str = str.replace('\n', '_').replace('\r', '_');
+ }
+ return str;
}
}
