Wrap Repository and associated resources with try-with-resource

The lack of use of try-with-resource pattern caused the leak
of Repository and associated wrapper objects left open.
After the introduction of the Repository objects leak detector
in Gerrit master with I3037064 the tests were failing because
of the leaks left behind.

Wrap all the Repository objects created directly or indirectly
through one of its container objects and make sure that all tests
are executed without leaks.

Change-Id: Ia20fb505b3d8c9db04b8b50e16a9a3d41bba5d96
3 files changed
tree: 87540d1ce9b118915763b597de17eff60037dfa3
  1. .settings/
  2. src/
  3. tools/
  4. .bazelignore
  5. .bazelrc
  6. .bazelversion
  7. .gitignore
  8. bazlets.bzl
  9. BUILD
  10. deps.bzl
  11. LICENSE
  12. README.md
  13. WORKSPACE
README.md

Rename project plugin for Gerrit Code Review

This plugin currently supports Gerrit version 2.14.X and 2.15.X with changes in reviewDb. Also supported is the noteDb alternative for Gerrit versions 2.15.X and above.

For more information, see: src/main/resources/Documentation/about.md