Fix typo in exception message

This commit is contained in:
Norman Maurer 2021-04-22 08:22:37 +02:00
parent 1d802d9da5
commit 36dcaf0c50

View File

@ -189,7 +189,7 @@ public final class ObjectUtil {
public static <T> T[] checkNonEmpty(T[] array, String name) { public static <T> T[] checkNonEmpty(T[] array, String name) {
//No String concatenation for check //No String concatenation for check
if (checkNotNull(array, name).length == 0) { if (checkNotNull(array, name).length == 0) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return array; return array;
} }
@ -202,7 +202,7 @@ public final class ObjectUtil {
public static byte[] checkNonEmpty(byte[] array, String name) { public static byte[] checkNonEmpty(byte[] array, String name) {
//No String concatenation for check //No String concatenation for check
if (checkNotNull(array, name).length == 0) { if (checkNotNull(array, name).length == 0) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return array; return array;
} }
@ -215,7 +215,7 @@ public final class ObjectUtil {
public static char[] checkNonEmpty(char[] array, String name) { public static char[] checkNonEmpty(char[] array, String name) {
//No String concatenation for check //No String concatenation for check
if (checkNotNull(array, name).length == 0) { if (checkNotNull(array, name).length == 0) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return array; return array;
} }
@ -228,7 +228,7 @@ public final class ObjectUtil {
public static <T extends Collection<?>> T checkNonEmpty(T collection, String name) { public static <T extends Collection<?>> T checkNonEmpty(T collection, String name) {
//No String concatenation for check //No String concatenation for check
if (checkNotNull(collection, name).size() == 0) { if (checkNotNull(collection, name).size() == 0) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return collection; return collection;
} }
@ -240,7 +240,7 @@ public final class ObjectUtil {
*/ */
public static String checkNonEmpty(final String value, final String name) { public static String checkNonEmpty(final String value, final String name) {
if (checkNotNull(value, name).isEmpty()) { if (checkNotNull(value, name).isEmpty()) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return value; return value;
} }
@ -252,7 +252,7 @@ public final class ObjectUtil {
*/ */
public static <K, V, T extends Map<K, V>> T checkNonEmpty(T value, String name) { public static <K, V, T extends Map<K, V>> T checkNonEmpty(T value, String name) {
if (checkNotNull(value, name).isEmpty()) { if (checkNotNull(value, name).isEmpty()) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return value; return value;
} }
@ -264,7 +264,7 @@ public final class ObjectUtil {
*/ */
public static CharSequence checkNonEmpty(final CharSequence value, final String name) { public static CharSequence checkNonEmpty(final CharSequence value, final String name) {
if (checkNotNull(value, name).length() == 0) { if (checkNotNull(value, name).length() == 0) {
throw new IllegalArgumentException("Param '" + name + "' must not be emtpy"); throw new IllegalArgumentException("Param '" + name + "' must not be empty");
} }
return value; return value;
} }