From fd0b58c7d9cdd7c0ecf2bcc658d13b18ee4f79b3 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Thu, 26 Dec 2024 12:01:53 +0100 Subject: [PATCH] CB-5609. Refactor after review --- .../src/io/cloudbeaver/service/fs/impl/WebServiceFS.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/bundles/io.cloudbeaver.service.fs/src/io/cloudbeaver/service/fs/impl/WebServiceFS.java b/server/bundles/io.cloudbeaver.service.fs/src/io/cloudbeaver/service/fs/impl/WebServiceFS.java index b7e6b3366b..de028878e4 100644 --- a/server/bundles/io.cloudbeaver.service.fs/src/io/cloudbeaver/service/fs/impl/WebServiceFS.java +++ b/server/bundles/io.cloudbeaver.service.fs/src/io/cloudbeaver/service/fs/impl/WebServiceFS.java @@ -282,11 +282,11 @@ public boolean deleteFile( } } - public void validateFilename(@NotNull String filename) throws DBWebException { + private void validateFilename(@NotNull String filename) throws DBWebException { Matcher matcher = FORBIDDEN_FILENAME_PATTERN.matcher(filename); if (matcher.find()) { - throw new DBWebException("File includes forbidden symbols: " + filename); + throw new DBWebException(String.format("File %s contains forbidden symbols", filename)); } } }