Skip to content

Commit 2038b17

Browse files
committed
BugFix: Return empty array when there is no configuration files
1 parent 7e70eb2 commit 2038b17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/root/core/repository/implement/PropertyRepositoryImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ public void loadMonitoringInfoConfig(String filePath) {
319319
public String[] getConnectionInfoFileNames() {
320320
String connInfoDirPath = "./config/connectioninfo";
321321
String[] connInfoFileList = new File(connInfoDirPath).list();
322+
if(connInfoFileList == null || connInfoFileList.length == 0) {
323+
return new String[] {};
324+
}
325+
322326
for (int i = 0; i < connInfoFileList.length; i++) {
323327
connInfoFileList[i] = connInfoDirPath + "/" + connInfoFileList[i];
324328
}

0 commit comments

Comments
 (0)