Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0257ebb

Browse files
authored
Merge pull request hub4j#1460 from scottrw93/patch-1
Fix deadlock in getCommit
2 parents aa363a5 + f29f24a commit 0257ebb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/kohsuke/github/GHRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ public class GHRepository extends GHObject {
113113

114114
private String pushed_at;
115115

116-
private Map<Integer, GHMilestone> milestones = new WeakHashMap<Integer, GHMilestone>();
116+
private Map<Integer, GHMilestone> milestones = Collections.synchronizedMap(new WeakHashMap<>());
117117

118118
private String default_branch, language;
119119

120-
private Map<String, GHCommit> commits = new WeakHashMap<String, GHCommit>();
120+
private Map<String, GHCommit> commits = Collections.synchronizedMap(new WeakHashMap<>());
121121

122122
@SkipFromToString
123123
private GHRepoPermission permissions;

0 commit comments

Comments
 (0)