mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 06:41:08 +00:00
handle null pointer
This commit is contained in:
@@ -362,7 +362,12 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
|||||||
if (folderCache.get() == null) {
|
if (folderCache.get() == null) {
|
||||||
KList<File> fc = new KList<>();
|
KList<File> fc = new KList<>();
|
||||||
|
|
||||||
for (File i : root.listFiles()) {
|
File[] files = root.listFiles();
|
||||||
|
if (files == null) {
|
||||||
|
throw new IllegalStateException("Failed to list files in " + root);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File i : files) {
|
||||||
if (i.isDirectory()) {
|
if (i.isDirectory()) {
|
||||||
if (i.getName().equals(folderName)) {
|
if (i.getName().equals(folderName)) {
|
||||||
fc.add(i);
|
fc.add(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user