grpc / grpc/grpc-java

Tracking issue for StatusOr Experimental API

Open
#11,563 1 comment 0 reactions 1 assignee Claimed by @kannanjgithub View on GitHub
experimental API
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.