uuuyuqi commented on code in PR #16231:
URL: https://github.com/apache/dubbo/pull/16231#discussion_r3144520929


##########
dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java:
##########
@@ -1027,7 +1027,7 @@ private Map<String, Class<?>> loadExtensionClasses() 
throws InterruptedException
         }
 
         if (logger.isDebugEnabled()) {
-            Long costMillis = startNanos != -1 ? (System.nanoTime() - 
startNanos) / 1_000_000L : null;
+            Long costMillis = (System.nanoTime() - startNanos) / 1_000_000L;

Review Comment:
   At this point, startNanos might be null, for example, if the application 
dynamically modifies the log level at runtime. This is quite common in online 
troubleshooting scenarios. To be on the safe side, it's probably best to assign 
an initial value of null or -1.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to