|
@@ -313,9 +313,17 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
|
313
|
313
|
* this plugin.
|
314
|
314
|
*/
|
315
|
315
|
private void loadIdentities() {
|
|
316
|
+ if (!Files.exists(pluginFilesystem.getPath("/META-INF/identities/"))) {
|
|
317
|
+ return;
|
|
318
|
+ }
|
316
|
319
|
try {
|
317
|
|
- final Map<String, InputStream> identityStreams = getResourceManager()
|
318
|
|
- .getResourcesStartingWithAsInputStreams("META-INF/identities/");
|
|
320
|
+ final Map<String, InputStream> identityStreams = new HashMap<>();
|
|
321
|
+ try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(
|
|
322
|
+ pluginFilesystem.getPath("/META-INF/licenses/"))) {
|
|
323
|
+ for (Path path : directoryStream) {
|
|
324
|
+ identityStreams.put(path.getFileName().toString(), Files.newInputStream(path));
|
|
325
|
+ }
|
|
326
|
+ }
|
319
|
327
|
|
320
|
328
|
unloadIdentities();
|
321
|
329
|
|