Merge pull request #1014 from Md-Yasir/enhancement/string-check

changed string checking logic
This commit is contained in:
Sean Leary
2025-10-11 21:02:44 -05:00
committed by GitHub

View File

@@ -183,7 +183,7 @@ public class CDL {
Object object = ja.opt(i);
if (object != null) {
String string = object.toString();
if (string.length() > 0 && (string.indexOf(delimiter) >= 0 ||
if (!string.isEmpty() && (string.indexOf(delimiter) >= 0 ||
string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 ||
string.indexOf(0) >= 0 || string.charAt(0) == '"')) {
sb.append('"');