ccding commented on a change in pull request #11110:
URL: https://github.com/apache/kafka/pull/11110#discussion_r683573626



##########
File path: 
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java
##########
@@ -253,9 +253,9 @@ public RemoteLogManagerConfig(AbstractConfig config) {
              config.getInt(REMOTE_LOG_READER_THREADS_PROP),
              config.getInt(REMOTE_LOG_READER_MAX_PENDING_TASKS_PROP),
              config.getString(REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP),
-             
config.originalsWithPrefix(config.getString(REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP)),
+             
config.originalsWithPrefix(config.getString(REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP)
 == null ? "" : config.getString(REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP)),

Review comment:
       We will get a null pointer exception when we call `new KafkaConfig()` 
without setting `REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP`. E.g., 
https://github.com/apache/kafka/blob/d6f6edd2b17cbaccd4c87bfa66f871a676760044/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala#L1057
   
   This happens everywhere in the codebase after this change: 
   
https://github.com/apache/kafka/pull/11110/files#diff-cbe6a8b71b05ed22cf09d97591225b588e9fca6caaf95d3b34a43262cfd23aa6R1437-R1438




-- 
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