You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by js...@apache.org on 2024/08/15 16:18:44 UTC

(kafka) branch 3.9 updated: MINOR: Fix visibility for classes exposed outside of their scope (#16886)

This is an automated email from the ASF dual-hosted git repository.

jsancio pushed a commit to branch 3.9
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/3.9 by this push:
     new 3b90bbaf6fb MINOR: Fix visibility for classes exposed outside of their scope (#16886)
3b90bbaf6fb is described below

commit 3b90bbaf6fb3d1519f7647c926126ceebb68d7b5
Author: Josep Prat <jo...@aiven.io>
AuthorDate: Thu Aug 15 18:10:10 2024 +0200

    MINOR: Fix visibility for classes exposed outside of their scope (#16886)
    
    These 2 classes are package protected but they are part of the public
    API of public methods. To have clean APIs we should make this
    consistent.
    
    Static class ReplicaState is exposed in RaftUtil#singletonDescribeQuorumResponse method which is public.
    
    RequestSender is implemented by a public class and it's exposed in the public constructor of AddVoterHandler.
    
    Reviewers: José Armando García Sancio <js...@apache.org>
---
 raft/src/main/java/org/apache/kafka/raft/LeaderState.java             | 2 +-
 raft/src/main/java/org/apache/kafka/raft/internals/RequestSender.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/raft/src/main/java/org/apache/kafka/raft/LeaderState.java b/raft/src/main/java/org/apache/kafka/raft/LeaderState.java
index 5c468fc9957..05f6eaf5ebb 100644
--- a/raft/src/main/java/org/apache/kafka/raft/LeaderState.java
+++ b/raft/src/main/java/org/apache/kafka/raft/LeaderState.java
@@ -691,7 +691,7 @@ public class LeaderState<T> implements EpochState {
         }
     }
 
-    static class ReplicaState implements Comparable<ReplicaState> {
+    public static class ReplicaState implements Comparable<ReplicaState> {
         private ReplicaKey replicaKey;
         private Endpoints listeners;
         private Optional<LogOffsetMetadata> endOffset;
diff --git a/raft/src/main/java/org/apache/kafka/raft/internals/RequestSender.java b/raft/src/main/java/org/apache/kafka/raft/internals/RequestSender.java
index d30b259c7d8..8d00bb9a27a 100644
--- a/raft/src/main/java/org/apache/kafka/raft/internals/RequestSender.java
+++ b/raft/src/main/java/org/apache/kafka/raft/internals/RequestSender.java
@@ -29,7 +29,7 @@ import java.util.function.Supplier;
  * Responsible for managing the connection state and sending request when the connection is
  * available.
  */
-interface RequestSender {
+public interface RequestSender {
     /**
      * The name of the listener used for sending request.
      *