sijie commented on a change in pull request #301: Issue-299 EnsemblePlacementPolicy in 4.5 is not compatible with 4.4 clients URL: https://github.com/apache/bookkeeper/pull/301#discussion_r129761307
########## File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java ########## @@ -50,16 +55,21 @@ * @param featureProvider feature provider * @param statsLogger stats logger */ - public EnsemblePlacementPolicy initialize(ClientConfiguration conf, + public default EnsemblePlacementPolicy initialize(ClientConfiguration conf, Optional<DNSToSwitchMapping> optionalDnsResolver, HashedWheelTimer hashedWheelTimer, FeatureProvider featureProvider, - StatsLogger statsLogger); + StatsLogger statsLogger) { + return initialize(conf); Review comment: the way I suggested doesn't prevent you calling initialize(conf), no? - if your placement policy implements the interface directly, you anyway already implement initialize(conf) - if you placement policy extends the default ensemble placement policy, this default ensemble placement policy implements the new initialize method hence the old initialize method is already implemented. Your approach looks messy because the dependency is somehow very strange. if you follow the rule I suggested, it is very clear. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services