Fix StackOverflow caused by infinite method recursion
Commit e092bbf83c5056fd02619d722b766882f44e982b changed the method
signature of `shouldReplicate(ProjectControl)` to
`shouldReplicate(ProjectState, CurrentUser)`.
The thread scoper callable now calls `shouldReplicate(Project.NameKey)`
which matches with
`shouldReplicate(Project.NameKey, ReplicationState...)`,
resulting in an infinite recursion.
Caused by: java.lang.StackOverflowError
at com.google.gerrit.server.util.ThreadLocalRequestContext.getContext(ThreadLocalRequestContext.java:87)
at com.google.gerrit.server.util.ThreadLocalRequestContext.setContext(ThreadLocalRequestContext.java:80)
at com.google.gerrit.server.util.RequestScopePropagator.lambda$context$0(RequestScopePropagator.java:178)
at com.google.gerrit.server.git.PerThreadRequestScope$Propagator.lambda$scope$0(PerThreadRequestScope.java:73)
at com.googlesource.gerrit.plugins.replication.Destination.shouldReplicate(Destination.java:301)
at com.googlesource.gerrit.plugins.replication.Destination.access$500(Destination.java:81)
at com.googlesource.gerrit.plugins.replication.Destination$3.call(Destination.java:298)
at com.googlesource.gerrit.plugins.replication.Destination$3.call(Destination.java:295)
......
Change-Id: Ib8358a9f2b96031e8d63536c7c191ba9783570ef
Signed-off-by: Alexander Martinz <alex@amartinz.at>
1 file changed