ibessonov commented on code in PR #4609:
URL: https://github.com/apache/ignite-3/pull/4609#discussion_r1810250933


##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/validation/CamelCaseKeysValidator.java:
##########
@@ -26,17 +26,15 @@
 
 /** {@link Validator} implementation for the {@link CamelCaseKeys} annotation. 
*/
 public class CamelCaseKeysValidator implements Validator<CamelCaseKeys, 
NamedListView<?>> {
-    private static final String CAMEL_CASE_GOOGLE_STYLE = 
"https://google.github.io/styleguide/javaguide.html#s5.3-camel-case";;
-
-    private final Pattern camelCalePattern = 
Pattern.compile("[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?");
+    private static final Pattern CAMEL_CASE_PATTERN = 
Pattern.compile("^[a-z]([A-Za-z][a-z]+)*$");

Review Comment:
   ```suggestion
       private static final Pattern CAMEL_CASE_PATTERN = 
Pattern.compile("^[a-z]+([A-Z][a-z]+)*$");
   ```



##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/validation/CamelCaseKeysValidator.java:
##########
@@ -26,17 +26,15 @@
 
 /** {@link Validator} implementation for the {@link CamelCaseKeys} annotation. 
*/
 public class CamelCaseKeysValidator implements Validator<CamelCaseKeys, 
NamedListView<?>> {
-    private static final String CAMEL_CASE_GOOGLE_STYLE = 
"https://google.github.io/styleguide/javaguide.html#s5.3-camel-case";;
-
-    private final Pattern camelCalePattern = 
Pattern.compile("[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?");
+    private static final Pattern CAMEL_CASE_PATTERN = 
Pattern.compile("^[a-z]([A-Za-z][a-z]+)*$");

Review Comment:
   It would be more efficient this way



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to