jerrypeng commented on a change in pull request #10775:
URL: https://github.com/apache/pulsar/pull/10775#discussion_r644303810



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1212,12 +1212,15 @@ void sendComplete(final Exception e) {
                     TimeoutException te = (TimeoutException) e;
                     long sequenceId = te.getSequenceId();
                     long ns = System.nanoTime();
+
+                    String firstSentString = firstSentAt == 0 ? "never" : 
String.format("%d ns ago", ns - firstSentAt);
+                    String lastSentString = lastSentAt == 0 ? "never" : 
String.format("%d ns ago", ns - lastSentAt);

Review comment:
       In java numeric primitives are by default initialized to 0 so explicitly 
initializing numeric primitive types to zero is superfluous.  I did not want to 
change more existing code that was not related to this PR.




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


Reply via email to