Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Uploader
Commits
bd436488
Commit
bd436488
authored
Feb 10, 2020
by
Matija Obreza
Browse files
Fix: Regexp matcher bug when replace text contains '$'
parent
ee8118de
Changes
2
Hide whitespace changes
Inline
Side-by-side
anno-gui/src/main/java/org/genesys2/anno/converter/RowConverter.java
View file @
bd436488
...
...
@@ -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=" +
...
...
anno-gui/src/main/java/org/genesys2/anno/gui/PushDialog.java
View file @
bd436488
...
...
@@ -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
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment