Do not use HTTP requests, add integration tests, etc.

These changes are required to match Google Java coding style
and run on Google Gerrit production servers.
* Replace old calls to Gerrit REST API and Json processing
  with calls to Gerrit Java APIs.
* Remove mocked classes in unit tests; replace them with integration test.
* Use Google Java Coding Style and google-java-format,
  with line length limit of 100 characters.
* Replace Servlet with RestReadView<ChangeResource>
* Delegate GetOwners.apply to Action.apply.
* Update; move path2owners and owner2paths
  into dbgmsgs of REST API result.
* Remove the "server" url in returned JSON debug info.
* Fix "owner_revision" bug in returned JSON.
* Make the Cache configurable through maxCacheAge and maxCacheSize,
  with default no Cache and
* Throw exceptions instead of returning error code;
  use BadRequestException.
* Remove TRACE_SERVER_MSG, reduce some debug/trace messages.
* Decouple the Parser and OwnersDb classes.
* Do without String2*, StringSet, Owner2Weights classes.
* Replace Action.Input with Action.Parameters.
* Read config parameters from find-owners.config.
* Remove Server, move methods into Action, Checker, OwnersDb.
* Use AccountCache.

Change-Id: I502e29018247c389fa9ffffd3e5fce1815a4cd08
27 files changed
tree: 9e7aabfc7fe7c89aaa97f9331cff7ef15573b66d
  1. src/
  2. BUILD