This is an automated email from the ASF dual-hosted git repository. xvrl pushed a commit to branch revert-12147-remove-stringformat in repository https://gitbox.apache.org/repos/asf/druid.git
commit eb2d1014f5ead92300c6ad40ab41ff55ff5821a6 Author: Xavier Léauté <[email protected]> AuthorDate: Wed Jan 12 16:36:24 2022 -0800 Revert "avoid unnecessary String.format calls in IdUtils.validateId (#12147)" This reverts commit 168187e6df714a04a2a80dffc892a49fce8cb217. --- core/src/main/java/org/apache/druid/common/utils/IdUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/apache/druid/common/utils/IdUtils.java b/core/src/main/java/org/apache/druid/common/utils/IdUtils.java index c530013..549bf45 100644 --- a/core/src/main/java/org/apache/druid/common/utils/IdUtils.java +++ b/core/src/main/java/org/apache/druid/common/utils/IdUtils.java @@ -46,20 +46,20 @@ public class IdUtils { Preconditions.checkArgument( !Strings.isNullOrEmpty(stringToValidate), - "%s cannot be null or empty. Please provide a %s.", thingToValidate, thingToValidate + StringUtils.format("%s cannot be null or empty. Please provide a %s.", thingToValidate, thingToValidate) ); Preconditions.checkArgument( !stringToValidate.startsWith("."), - "%s cannot start with the '.' character.", thingToValidate + StringUtils.format("%s cannot start with the '.' character.", thingToValidate) ); Preconditions.checkArgument( !stringToValidate.contains("/"), - "%s cannot contain the '/' character.", thingToValidate + StringUtils.format("%s cannot contain the '/' character.", thingToValidate) ); Matcher m = INVALIDCHARS.matcher(stringToValidate); Preconditions.checkArgument( !m.matches(), - "%s cannot contain whitespace character except space.", thingToValidate + StringUtils.format("%s cannot contain whitespace character except space.", thingToValidate) ); for (int i = 0; i < stringToValidate.length(); i++) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
