mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-24 01:02:00 +01:00
Ensure class argument is not null when comparing list types
This commit is contained in:
parent
cd3803f4cd
commit
28030649c2
@ -38,10 +38,10 @@ public class ConfigUtil {
|
|||||||
*
|
*
|
||||||
* @param list The list to check objects of
|
* @param list The list to check objects of
|
||||||
* @param clazz The class to compare against
|
* @param clazz The class to compare against
|
||||||
* @return false if list is null or list object does not match
|
* @return false if arg is null or list object does not match
|
||||||
*/
|
*/
|
||||||
public static boolean checkList(final List<?> list, final Class<?> clazz) {
|
public static boolean checkList(final List<?> list, final Class<?> clazz) {
|
||||||
if (list == null) {
|
if (list == null || clazz == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (final Object o : list) {
|
for (final Object o : list) {
|
||||||
|
Loading…
Reference in New Issue
Block a user