tinaselenge commented on code in PR #14995:
URL: https://github.com/apache/kafka/pull/14995#discussion_r1453337557


##########
clients/src/main/java/org/apache/kafka/common/config/provider/FileConfigProvider.java:
##########
@@ -40,7 +42,13 @@ public class FileConfigProvider implements ConfigProvider {
 
     private static final Logger log = 
LoggerFactory.getLogger(FileConfigProvider.class);
 
+    public static final String ALLOWED_PATHS_CONFIG = "allowed.paths";
+    public static final String ALLOWED_PATHS_DOC = "A comma separated list of 
paths that this config provider is " +
+            "allowed to access. If not set, all paths are allowed.";
+    private AllowedPaths allowedPaths = null;

Review Comment:
   This is a good point! As suggested in the comments below, we can make the 
constructor take in a String for the configValue and set the allowList. And 
here we can set it to `new AllowedPaths(null)` so that we avoid NPE and it 
always defaults to the previous behaviour allowing all paths. 
   
   Could there be users who don't call configure first necessarily? I'm worried 
that throwing IllegalStateException could cause backward compatibility issue.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to