Java 17 features (#15493)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -56,7 +56,7 @@ public class RegExTransformationService implements TransformationService {
|
||||
String regex = substMatcher.group(1);
|
||||
String substitution = substMatcher.group(2);
|
||||
String options = substMatcher.group(3);
|
||||
if (options.equals("g")) {
|
||||
if ("g".equals(options)) {
|
||||
result = source.trim().replaceAll(regex, substitution);
|
||||
} else {
|
||||
result = source.trim().replaceFirst(regex, substitution);
|
||||
|
||||
Reference in New Issue
Block a user