From 1ccce3f94210fc57a73a9341a321f629e9e02731 Mon Sep 17 00:00:00 2001 From: bgamard Date: Thu, 5 May 2022 18:15:24 +0200 Subject: [PATCH] rename --- .../src/main/java/com/sismics/rest/util/ValidationUtil.java | 2 +- .../main/java/com/sismics/docs/rest/resource/UserResource.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs-web-common/src/main/java/com/sismics/rest/util/ValidationUtil.java b/docs-web-common/src/main/java/com/sismics/rest/util/ValidationUtil.java index 56b96e63..0c5a279d 100644 --- a/docs-web-common/src/main/java/com/sismics/rest/util/ValidationUtil.java +++ b/docs-web-common/src/main/java/com/sismics/rest/util/ValidationUtil.java @@ -154,7 +154,7 @@ public class ValidationUtil { } } - public static void validateUsernamepattern(String s, String name) throws ClientException { + public static void validateUsername(String s, String name) throws ClientException { if (!USERNAME_PATTERN.matcher(s).matches()) { throw new ClientException("ValidationError", MessageFormat.format("{0} must have only alphanumeric, underscore characters or @ and .", name)); } diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java index 4878d7f7..3e36d667 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/UserResource.java @@ -88,7 +88,7 @@ public class UserResource extends BaseResource { // Validate the input data username = ValidationUtil.validateLength(username, "username", 3, 50); - ValidationUtil.validateUsernamepattern(username, "username"); + ValidationUtil.validateUsername(username, "username"); password = ValidationUtil.validateLength(password, "password", 8, 50); email = ValidationUtil.validateLength(email, "email", 1, 100); Long storageQuota = ValidationUtil.validateLong(storageQuotaStr, "storage_quota");