Skip to content

Commit

Permalink
change to use regex Pattern that transfer from constructor function,#361
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Sep 20, 2024
1 parent 2966dc6 commit 395728b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static class SplitableTableInDB extends TableInDB {

public SplitableTableInDB(DBIdentity id, Pattern splitTabPattern) {
super(id);
this.splitTabPattern = splitTabPattern;
this.splitTabPattern = Objects.requireNonNull(splitTabPattern, "splitTabPattern can not be null");
}

@Override
Expand Down Expand Up @@ -138,7 +138,7 @@ public Function<String, String> getPhysicsTabName2LogicNameConvertor() {
*/
@Override
public void add(String jdbcUrl, String tab) {
Matcher matcher = PATTERN_PHYSICS_TABLE.matcher(tab);
Matcher matcher = this.splitTabPattern.matcher(tab);

if (matcher.matches()) {
String logicTabName = matcher.group(1);
Expand Down

0 comments on commit 395728b

Please sign in to comment.