xiangwangcheng commented on a change in pull request #1361: fix logging module 
bug
URL: https://github.com/apache/rocketmq/pull/1361#discussion_r313705377
 
 

 ##########
 File path: logging/src/main/java/org/apache/rocketmq/logging/inner/Logger.java
 ##########
 @@ -88,8 +88,8 @@ synchronized void closeNestedAppenders() {
         Enumeration enumeration = this.getAllAppenders();
         if (enumeration != null) {
             while (enumeration.hasMoreElements()) {
-                Appender a = (Appender) enumeration.nextElement();
-                if (a instanceof Appender.AppenderPipeline) {
+                if (enumeration instanceof Appender) {
 
 Review comment:
   Two kinds of Appender here,  AsyncAppender and WriterAppender. AyscAppender 
is implementing AppenderPipeline, so it is an instance of AppenderPipeline.
   
   And back to your code, enumeration is definitely not an instance of 
Appender(enumeration.nextElement() is).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to