Commit bd436488 authored by Matija Obreza's avatar Matija Obreza

Fix: Regexp matcher bug when replace text contains '$'

parent ee8118de
......@@ -173,7 +173,8 @@ public class RowConverter {
Matcher replaceMat = REGEXP_REPLACE_PATTERN.matcher(groupPattern);
while (replaceMat.find()) {
int group = Integer.parseInt(replaceMat.group(1));
res = res.replaceAll("\\$" + group, matcher.group(group));
// StringUtils.replace() -- because of $ characters (problematic $1) replace text
res = StringUtils.replace(res, "$" + group, matcher.group(group));
}
}
// System.err.println("Pattern=" + pattern + " groups=" +
......
......@@ -640,7 +640,11 @@ public class PushDialog extends Dialog {
// Filter only for specific INSTCODES
final Set<String> instCodesFilter = settings.getInstCodeSettings().getInstCodes();
final boolean isBlackList = settings.getInstCodeSettings().isBlackList();
_log.warn("Running upload for " + instCodesFilter.toString());
if (isBlackList) {
_log.warn("Excluding upload for " + instCodesFilter.toString());
} else {
_log.warn("Running upload for " + instCodesFilter.toString());
}
try (RowReader rowReader = dataSourceLoader.createRowReader(dataSourceSheet, dataSource)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment