if (files == null || files.length == 0) {
return list;
}
for (File file : files) {
PluginRegistry registry = null;
try {
String json = FileUtils.readContent(file, "\n");
registry = JsonUtils.fromJsonString(json, PluginRegistry.class);
registry.setup();
} catch (Exception e) {
logger.error("Failed to deserialize " + file, e);
}
if (registry != null) {
list.add(registry);