Skip to content

Commit

Permalink
Replace Java 10 Set copy with Java 8 compatible creation
Browse files Browse the repository at this point in the history
thank you for the review!
  • Loading branch information
ArneBab committed Jul 28, 2024
1 parent 4ebce69 commit 4c3ffb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/freenet/pluginmanager/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ public void addStartingPlugin(PluginProgress pluginProgress) {
public Collection<PluginProgress> getStartingPlugins() {
Set<PluginProgress> startingPluginsCopy;
synchronized (this) {
startingPluginsCopy = Set.copyOf(startingPlugins);
startingPluginsCopy = new HashSet<>(startingPlugins);
}
return startingPluginsCopy;
}
Expand All @@ -1631,7 +1631,7 @@ public void removeStartingPlugin(PluginProgress pluginProgress) {
public Collection<PluginInfoWrapper> getLoadedPlugins() {
Set<PluginInfoWrapper> loadedPluginsCopy;
synchronized (this) {
loadedPluginsCopy = Set.copyOf(loadedPlugins);
loadedPluginsCopy = new HashSet<>(loadedPlugins);
}
return loadedPluginsCopy;
}
Expand Down

0 comments on commit 4c3ffb1

Please sign in to comment.