AnonHxy opened a new pull request, #4124: URL: https://github.com/apache/bookkeeper/pull/4124
Descriptions of the changes in this PR: ### Motivation Remove the null-check from `AbstractZkLedgerManagerFactory#newLedgerManagerFactory`. The reason is that: 1. the parameter `layoutManager` in `newLedgerManagerFactory()` method can never be null. So this check is unnecessory 2. If the `layoutManager` is null and we return `new FlatLedgerManagerFactory().initialize(conf, null, FlatLedgerManagerFactory.CUR_VERSION)`, the 'zk' in `FlatLedgerManagerFactory` is null and could throw NPE when invoke the methods in the `FlatLedgerManagerFactory`. ### Changes 1. Cleanup layoutManager null-check when `newLedgerManagerFactory()` 2. Let `layoutManager` could never be null in `FlatLedgerManagerFactory` -- 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]
