Skip to content

Commit

Permalink
Add ability to remove a provider from DefaultFileSystemManager #149.
Browse files Browse the repository at this point in the history
Simplify.
  • Loading branch information
garydgregory committed Dec 4, 2020
1 parent d49bdd5 commit 571d509
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -217,7 +217,7 @@ public void addProvider(final String[] urlSchemes, final FileProvider provider)
public void removeProvider(final String urlScheme) {
final FileProvider provider = providers.remove(urlScheme);
// check whether the same instance is not used somewhere else
if (provider != null && providers.values().stream().noneMatch(p -> p == provider)) {
if (provider != null && !providers.containsValue(provider)) {
closeComponent(provider);
}
}
Expand Down

0 comments on commit 571d509

Please sign in to comment.