Skip to content

Commit

Permalink
Fix repo block generation for items without additional repos
Browse files Browse the repository at this point in the history
  • Loading branch information
kantenkugel committed Mar 27, 2021
1 parent c9c2537 commit 1ef5d23
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -10,10 +10,7 @@
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;

import java.util.EnumSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.function.Supplier;

public abstract class VersionedItem
Expand Down Expand Up @@ -72,7 +69,7 @@ public Set<RepoType> getAdditionalRepositories() {
* @return Set of all relevant Repositories
*/
public final Set<RepoType> getAllRepositories() {
EnumSet<RepoType> repoTypes = EnumSet.copyOf(getAdditionalRepositories());
Set<RepoType> repoTypes = new HashSet<>(getAdditionalRepositories());
if(getRepoType() != null) {
repoTypes.add(getRepoType());
}
Expand Down

0 comments on commit 1ef5d23

Please sign in to comment.