commit | 49e0101359d70062142bee9b9592a6535d44338a | [log] [tgz] |
---|---|---|
author | Saša Živkov <sasa.zivkov@sap.com> | Thu Jan 07 15:26:24 2021 +0100 |
committer | Saša Živkov <zivkov@gmail.com> | Thu Jan 07 16:28:37 2021 +0000 |
tree | 6241d76db65ab7602fd6d41ec16f159a55700d37 | |
parent | 35086cfdb5bffea4fd59583e0936c90f54c8763d [diff] |
Stop using deprecated JGit API getAllRefs Change-Id: I5dbb450cc426d2303415156c56a599fe4056171c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/CreateServiceUserNotes.java b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/CreateServiceUserNotes.java index 93fc84c..d60203b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/CreateServiceUserNotes.java +++ b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/CreateServiceUserNotes.java
@@ -131,8 +131,9 @@ } } - private void markUninteresting(Repository git, String branch, RevWalk rw, ObjectId oldObjectId) { - for (Ref r : git.getAllRefs().values()) { + private void markUninteresting(Repository git, String branch, RevWalk rw, ObjectId oldObjectId) + throws IOException { + for (Ref r : git.getRefDatabase().getRefs()) { try { if (r.getName().equals(branch)) { if (!ObjectId.zeroId().equals(oldObjectId)) {