| commit | 65810ac65f4581fe7834e6c80a5008b8e6f3a518 | [log] [tgz] |
|---|---|---|
| author | Luca Milanesio <luca.milanesio@gmail.com> | Sun Feb 09 10:11:29 2025 +0000 |
| committer | Luca Milanesio <luca.milanesio@gmail.com> | Mon Feb 10 05:36:20 2025 -0800 |
| tree | ff5a90563d618269a1a353dbcaae5c1013795419 | |
| parent | 856db3e1faca0a38dbea58d01d4e3f484c08efb5 [diff] |
Fix RepoView leak in CodeOwnerConfigValidator The onRefOperation() operation of CodeOwnerConfigValidator was creating a RepoView on-the-fly without a proper try-with-resource causing the leak of a Repository object reference counting. Extract the RepoView creation in onRefOperation in a separate variable. NOTE: ErrorProne could have spotted resources leaks in the first place, if RepoView was declared AutoCloseable and tagged with @MustBeClosed. That could now be possible but it would require a lot more invasive changes in JGit and Gerrit. [1] https://errorprone.info/bugpattern/MustBeClosedChecker Change-Id: I096453aed25c3d57bafdb8c8645233c04155adfd
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
For a detailed description of the plugin functionality please refer to the plugin documentation.
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide.
NOTE: The plugin documentation only renders correctly when the plugin is installed in Gerrit and the documentation is accessed via https:///plugins/code-owners/Documentation/index.html. If you want to read the documentation before installing the plugin, you can find it properly rendered here.
From the root of the gerrit repository.
bazel test //plugins/code-owners/web:karma_test
For testing the plugin with the Gerrit FE Dev Helper the command below builds
bazel build //plugins/code-owners/web:code-owners
ln -s bazel-bin/plugins/code-owners/web/code-owners.js polygerrit-ui/app/plugins/
and let the Dev Helper redirect from .+/plugins/code-owners/static/code-owners.js to http://localhost:8081/plugins/code-owners.js.