commit | 23a7dd50f66e0992c660778b69537d7ebd8f12cf | [log] [tgz] |
---|---|---|
author | Antonio Barone <syntonyze@gmail.com> | Thu Dec 15 00:03:41 2022 +0100 |
committer | Antonio Barone <syntonyze@gmail.com> | Thu Dec 15 17:07:32 2022 +0100 |
tree | 4bb64c22197a63d21156980e95e3298eec274125 | |
parent | ef55e804f886e3cdf99ca35cba428af13872a6b7 [diff] |
Fix NPE when accessing optional gitRepositoryManager Change I95ca0c2f9 introduced the concept of GitRepositoryManager annotated by LocalDiskRepositoryManager, optionally injected via Guice only when a named binding was provided. This was merged fine into stable-3.4, however it was mismerged when brought up to stable-3.5, since additional calls (`canPerformGC()` and `getRepositoryStatus()`) were not adapted and kept calling the optional `gitRepositoryManager` directly, causing a NPE: Caused by: NullPointerException at SharedRefDbGitRepositoryManager.canPerformGC(SharedRefDbGitRepositoryManager.java:119) Always access the repository manager via the `repositoryManager()` getter instead. Bug: Issue 16527 Change-Id: I34b780043acc22db9160db1e1dbf0c194f39c4d7
Global ref-database interface for use with Gerrit Code Review.
Enables the de-coupling between Gerrit, its libModules and the different implementations of a globally shared ref-database.
The design for a global ref-db interface can be found as part of the multi-site design documentation, where it first originated and was approved by the community.
In order to consume this library, some Guice bindings need to be registered appropriately. More information in the relevant documentation.