amendments according to code-review - COMMA_RIGHT_BEFORE_CLOSING_BRACE
This commit is contained in:
parent
eca01a2f9b
commit
054bff4355
@ -62,7 +62,7 @@ public class TemplateResolver {
|
||||
abstract String convert(final Object value, final Resolver resolver);
|
||||
}
|
||||
|
||||
private final static Pattern pattern = Pattern.compile(",(\\s*})", Pattern.MULTILINE);
|
||||
private static final Pattern COMMA_RIGHT_BEFORE_CLOSING_BRACE = Pattern.compile(",(\\s*})", Pattern.MULTILINE);
|
||||
private static final String IF_NOT_FOUND_SYMBOL = "???";
|
||||
|
||||
private final String template;
|
||||
@ -86,7 +86,7 @@ public class TemplateResolver {
|
||||
}
|
||||
|
||||
private static String removeDanglingCommas(final String withoutDroppedLines) {
|
||||
return pattern.matcher(withoutDroppedLines).replaceAll("$1");
|
||||
return COMMA_RIGHT_BEFORE_CLOSING_BRACE.matcher(withoutDroppedLines).replaceAll("$1");
|
||||
}
|
||||
|
||||
private String dropLinesWithNullProperties(final String text) {
|
||||
|
Loading…
Reference in New Issue
Block a user