grpc / grpc/grpc-java

Move Static factory methods off the class they construct.

Open
#3,440 0 comments 0 reactions 0 assignees View on GitHub
gRPC 2.0 usability
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

The `ManagedChannelBuilder` and `ServerBuilder` classes both expose static factory methods as a means to construct instances of themselves. These classes can be extended, which means that all subclasses inherit the static methods.

However, when these static methods are call on the subclasses, they often return a different type than expected (InProcessChannelBuilder returns based on the service loader, for instance. See #3438). This leads to confusion, and forces every subclass to add static methods that match the signatures)

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.