Reidddddd commented on PR #4038:
URL: https://github.com/apache/bookkeeper/pull/4038#issuecomment-1659939963

   > > And i skimmed the changes, seems `if (xxx instance of 
DefaultEntryLogger)` will resolve it? no need to add this method
   > 
   > Using instanceOf is not a good practice, It violates polymorphism.
   
   `compactingLogWriteDone` is only a private method in 
`TransactionalEntryLogCompactor.java`, not a common method in 
`AbstractLogCompactor`.
   
   What you did, in order to serve a private function in a concrete sub class, 
you added a function and parameters for other classes which don't need them
   
   When you are talking about polymorphism, polymorphism allows each sub-class 
has its own behaviour, you are enforcing all the sub-class to satisfy a 
concrete need not a common need, you are the one who breaks polymorphism... 


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