Files
gerrit/java
Patrick Hiesel a3b587c0ce Make ProjectCache#get return an Optional<ProjectState>
This refactoring forces callers to think about how to handle projects
that do not exist explicitly. As a general guidance, API handlers will
want to throw a BadRequestException and components in the inner works of
Gerrit where content should have been pre-validated should throw an
IllegalStateException.

But overall, it's a case-by-case decision.

In a follow-up commit, we will remove #checkedGet and move callers to
get instead.

Change-Id: I95bbc22ad5f3279e6f40f1d05c8d7235d601e32d
2020-03-06 10:56:40 +01:00
..
2020-01-07 17:14:41 +01:00