You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow null?
StatusOr needs to be as expressive as a method return value, although it will generally not be null. Can potentially use StatusOr<@nonnull> in cases it should be disallowed.
Should getValue() throw if there is no value?
Go with just getValue() throwing IllegalStateException for now. Can add getValueOrNull, getValueOrDefault, getValueOrThrow as we find usecases. Seems the majority case should check getStatus() first.
The text was updated successfully, but these errors were encountered:
Allow null?
StatusOr needs to be as expressive as a method return value, although it will generally not be null. Can potentially use StatusOr<@nonnull> in cases it should be disallowed.
Should getValue() throw if there is no value?
Go with just getValue() throwing IllegalStateException for now. Can add getValueOrNull, getValueOrDefault, getValueOrThrow as we find usecases. Seems the majority case should check getStatus() first.
The text was updated successfully, but these errors were encountered: