ijuma commented on code in PR #14681:
URL: https://github.com/apache/kafka/pull/14681#discussion_r1380892982


##########
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java:
##########
@@ -618,7 +618,7 @@ public ProducerConfig(Map<String, Object> props) {
         super(CONFIG, props);
     }
 
-    ProducerConfig(Map<?, ?> props, boolean doLog) {
+    protected ProducerConfig(Map<?, ?> props, boolean doLog) {

Review Comment:
   The KIP page states:
   
   > Any change that impacts the public interfaces of the project
   
   Then it lists examples:
   
   > Any class for which the build generates Javadoc
   
   Hopefully these parts are not controversial. Then the next question is which 
parts of a class are part of the public interface. This is defined by Java 
accessibility rules combined with project specific conventions.
   
   When it comes to Java accessibility rules, public classes and methods are 
obvious. The next bucket are protected methods of non-final public classes - 
those are also part of the public interface since one can call such methods 
from a subclass. Newer Java versions also have the concept of sealed classes, 
but we can ignore those for now.
   
   Finally, you have project-specific conventions. Some projects state 
explicitly which classes are designed for inheritance and all other ones are 
not supposed to be inherited (and hence their protected methods are not part of 
the public interface). Kafka (as far as I know) hasn't done this yet, but we 
probably should. One example of a project specific convention we have is the 
InterfaceStability annotation (it relaxes compatibility guarantees, but doesn't 
affect what's considered part of the public interface).
   
   Going back to the original question, does this need a KIP? If we are to 
follow the rules of the project, absolutely. If we want to change the rules, we 
should have the discussion and update the KIP documentation. Otherwise, it's 
difficult to be fair and consistent.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to