diff --git a/src/main/java/info/bukova/isspst/StringUtils.java b/src/main/java/info/bukova/isspst/StringUtils.java index 71df933f..af9f23b1 100644 --- a/src/main/java/info/bukova/isspst/StringUtils.java +++ b/src/main/java/info/bukova/isspst/StringUtils.java @@ -62,6 +62,12 @@ public class StringUtils { value = StringUtils.nullStr(value).toLowerCase(); search = StringUtils.nullStr(search).toLowerCase(); + + if (search.isEmpty()) + { + return true; + } + return value.startsWith(search); } diff --git a/src/main/java/info/bukova/isspst/data/MUnitEmb.java b/src/main/java/info/bukova/isspst/data/MUnitEmb.java index 59a451de..eac5c9db 100644 --- a/src/main/java/info/bukova/isspst/data/MUnitEmb.java +++ b/src/main/java/info/bukova/isspst/data/MUnitEmb.java @@ -60,7 +60,7 @@ public class MUnitEmb public static boolean isEqualMUnitEmbForFilter(MUnitEmb value, MUnitEmb search) { - if (search == null) + if ((search == null) || (search.getName() == null) || search.getName().isEmpty()) { return true; }