wu-sheng commented on a change in pull request #5602:
URL: https://github.com/apache/skywalking/pull/5602#discussion_r497985361



##########
File path: 
apm-commons/apm-datacarrier/src/main/java/org/apache/skywalking/apm/commons/datacarrier/buffer/Channels.java
##########
@@ -36,12 +36,13 @@ public Channels(int channelSize, int bufferSize, 
IDataPartitioner<T> partitioner
         bufferChannels = new QueueBuffer[channelSize];
         for (int i = 0; i < channelSize; i++) {
             if (BufferStrategy.BLOCKING.equals(strategy)) {
-                bufferChannels[i] = new 
ArrayBlockingQueueBuffer<T>(bufferSize, strategy);
+                bufferChannels[i] = new ArrayBlockingQueueBuffer<>(bufferSize, 
strategy);
             } else {
-                bufferChannels[i] = new Buffer<T>(bufferSize, strategy);
+                bufferChannels[i] = new Buffer<>(bufferSize, strategy);
             }
         }
-        size = channelSize * bufferSize;
+        // noinspection PointlessArithmeticExpression

Review comment:
       I think this comment makes sense. 
   The code fix is fine, but please correct the comments.




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