mirror of
https://github.com/RoastSlav/quickdrop.git
synced 2025-12-20 05:49:36 -06:00
Simplify validation logic in DataValidator.java
This commit is contained in:
@@ -8,11 +8,9 @@ public class DataValidator {
|
|||||||
public static boolean validateObjects(Object... objs) {
|
public static boolean validateObjects(Object... objs) {
|
||||||
for (Object temp : objs) {
|
for (Object temp : objs) {
|
||||||
if (temp != null) {
|
if (temp != null) {
|
||||||
if (temp instanceof String value) {
|
if (temp instanceof String value && value.trim().isEmpty()) {
|
||||||
if (value.trim().isEmpty()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user