Pace2Car commented on code in PR #25036:
URL: https://github.com/apache/shardingsphere/pull/25036#discussion_r1160497387
##########
kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/algorithm/traffic/segment/SQLRegexTrafficAlgorithm.java:
##########
@@ -37,6 +40,8 @@ public final class SQLRegexTrafficAlgorithm implements
SegmentTrafficAlgorithm {
public void init(final Properties props) {
Preconditions.checkArgument(props.containsKey(REGEX_PROPS_KEY), "%s
can not be null.", REGEX_PROPS_KEY);
regex = Pattern.compile(props.getProperty(REGEX_PROPS_KEY));
+
ShardingSpherePreconditions.checkState(Strings.isNullOrEmpty(String.valueOf(regex)),
+ () -> new
SegmentTrafficAlgorithmInitializationException(SQLRegexTrafficAlgorithm.class.getName(),
"sql must be not null or empty"));
Review Comment:
Please fix the message, replace `sql` to `regex`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]