You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Use IllegalArgumentException
In ConsumerConfig#validConsumerGroupParameter
private void validConsumerGroupParameter(String consumerGroup) throws Exception {
if (TStringUtils.isBlank(consumerGroup)) {
thrownew Exception("Illegal parameter: consumerGroup is Blank!");
}
String tmpConsumerGroup = String.valueOf(consumerGroup).trim();
if (tmpConsumerGroup.length() > TBaseConstants.META_MAX_GROUPNAME_LENGTH) {
thrownew Exception(new StringBuilder(512)
.append("Illegal parameter: the max length of consumerGroup is ")
.append(TBaseConstants.META_MAX_GROUPNAME_LENGTH)
.append(" characters").toString());
}
if (!tmpConsumerGroup.matches(TBaseConstants.META_TMP_GROUP_VALUE)) {
thrownew Exception(new StringBuilder(512)
.append("Illegal parameter: the value of consumerGroup")
.append(" must begin with a letter, ")
.append("can only contain characters,numbers,hyphen,and underscores").toString());
}
}
will change to throw IllegalArgumentException
private void validConsumerGroupParameter(String consumerGroup) throws Exception {
if (TStringUtils.isBlank(consumerGroup)) {
thrownew IllegalArgumentException("Illegal parameter: consumerGroup is Blank!");
}
String tmpConsumerGroup = String.valueOf(consumerGroup).trim();
if (tmpConsumerGroup.length() > TBaseConstants.META_MAX_GROUPNAME_LENGTH) {
thrownew IllegalArgumentException(new StringBuilder(512)
.append("Illegal parameter: the max length of consumerGroup is ")
.append(TBaseConstants.META_MAX_GROUPNAME_LENGTH)
.append(" characters").toString());
}
if (!tmpConsumerGroup.matches(TBaseConstants.META_TMP_GROUP_VALUE)) {
thrownew IllegalArgumentException(new StringBuilder(512)
.append("Illegal parameter: the value of consumerGroup")
.append(" must begin with a letter, ")
.append("can only contain characters,numbers,hyphen,and underscores").toString());
}
}
1. Fix typo
validConsumerGroupParmeter -> validConsumerGroupParameter
pushIsListenerWaitTimeoutRollBack -> pushListenerWaitTimeoutRollBack
pushIsListenerThrowedRollBack -> pushListenerThrowedRollBack
2. Use IllegalArgumentException
In ConsumerConfig#validConsumerGroupParameter
will change to throw IllegalArgumentException
The text was updated successfully, but these errors were encountered: