From 8a631d9948586a187c1de7c51dcf7c1fee896369 Mon Sep 17 00:00:00 2001 From: Anatolii Karlov Date: Thu, 28 Feb 2019 18:01:30 +0300 Subject: [PATCH] add validate condition for string parameters (#12) --- src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java b/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java index 40774cb..f332c19 100644 --- a/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java +++ b/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java @@ -5,7 +5,7 @@ import com.google.common.base.Strings; public class CheckerUtil { public static void checkString(String string, String exMessage) throws IllegalArgumentException { - if (Strings.isNullOrEmpty(string)) { + if (Strings.isNullOrEmpty(string) || string.contains(" ")) { throw new IllegalArgumentException(exMessage); } }