BAEL-838 Tiny change to keep code consistant. Return null or empty.
This commit is contained in:
parent
e497266a82
commit
a8041fef4f
@ -21,6 +21,6 @@ public class StringHelper {
|
|||||||
public static String removeLastCharRegexOptional(String s) {
|
public static String removeLastCharRegexOptional(String s) {
|
||||||
return Optional.ofNullable(s)
|
return Optional.ofNullable(s)
|
||||||
.map(str -> str.replaceAll(".$", ""))
|
.map(str -> str.replaceAll(".$", ""))
|
||||||
.orElse(null);
|
.orElse(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user