mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 19:00:38 +00:00
#1463 - NPE in MigrationModel.readMigrations() when running using File resources with no migration directory
This commit is contained in:
@@ -42,9 +42,10 @@ public class MigrationModel {
|
||||
|
||||
// find all the migration xml files
|
||||
File[] xmlFiles = modelDirectory.listFiles(pathname -> pathname.getName().toLowerCase().endsWith(modelSuffix));
|
||||
|
||||
if (xmlFiles == null || xmlFiles.length == 0) {
|
||||
return;
|
||||
}
|
||||
List<MigrationResource> resources = new ArrayList<>(xmlFiles.length);
|
||||
|
||||
for (File xmlFile : xmlFiles) {
|
||||
resources.add(new MigrationResource(xmlFile, createVersion(xmlFile)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user