shp jar실행 소스 수정

This commit is contained in:
2026-01-21 11:56:23 +09:00
parent 31e2a3e431
commit 1c684820b0

View File

@@ -92,8 +92,29 @@ public class ExternalJarRunner {
}
private void addArg(List<String> args, String key, String value) {
value = normalizeCliValue(value);
if (value != null && !value.isBlank()) {
log.info("addArg key={}, normalizedValue=[{}], length={}", key, value, value.length());
args.add("--" + key + "=" + value);
}
}
private String normalizeCliValue(String v) {
if (v == null) {
return null;
}
v = v.trim();
// 양끝 따옴표 제거
if (v.length() >= 2 && v.startsWith("\"") && v.endsWith("\"")) {
v = v.substring(1, v.length() - 1);
}
// 남아있는 따옴표 제거
v = v.replace("\"", "");
return v;
}
}