MINOR: AdminClient consumer group domain objects should have public constructors (#5063)

These constructors should be public to allow users to write test cases using them. We follow a similar pattern for the other domain objects that we expose in `AdminClient` (e.g. `TopicDescription`).

Reviewers: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
Jason Gustafson 2018-05-22 11:23:47 -07:00 committed by GitHub
parent c1b30a12b1
commit 5be47a2f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -37,12 +37,12 @@ public class ConsumerGroupDescription {
private final ConsumerGroupState state;
private final Node coordinator;
ConsumerGroupDescription(String groupId,
boolean isSimpleConsumerGroup,
Collection<MemberDescription> members,
String partitionAssignor,
ConsumerGroupState state,
Node coordinator) {
public ConsumerGroupDescription(String groupId,
boolean isSimpleConsumerGroup,
Collection<MemberDescription> members,
String partitionAssignor,
ConsumerGroupState state,
Node coordinator) {
this.groupId = groupId == null ? "" : groupId;
this.isSimpleConsumerGroup = isSimpleConsumerGroup;
this.members = members == null ? Collections.<MemberDescription>emptyList() :

View File

@ -34,7 +34,7 @@ public class MemberAssignment {
*
* @param topicPartitions List of topic partitions
*/
MemberAssignment(Set<TopicPartition> topicPartitions) {
public MemberAssignment(Set<TopicPartition> topicPartitions) {
this.topicPartitions = topicPartitions == null ? Collections.<TopicPartition>emptySet() :
Collections.unmodifiableSet(new HashSet<>(topicPartitions));
}

View File

@ -31,7 +31,7 @@ public class MemberDescription {
private final String host;
private final MemberAssignment assignment;
MemberDescription(String memberId, String clientId, String host, MemberAssignment assignment) {
public MemberDescription(String memberId, String clientId, String host, MemberAssignment assignment) {
this.memberId = memberId == null ? "" : memberId;
this.clientId = clientId == null ? "" : clientId;
this.host = host == null ? "" : host;