flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] pnowojski commented on a change in pull request #9903: [FLINK-14394][network] Remove unnecessary interface method BufferProvider#requestBufferBlocking
Date Tue, 15 Oct 2019 12:01:46 GMT
pnowojski commented on a change in pull request #9903: [FLINK-14394][network] Remove unnecessary
interface method BufferProvider#requestBufferBlocking
URL: https://github.com/apache/flink/pull/9903#discussion_r334908061
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolTest.java
 ##########
 @@ -306,7 +306,9 @@ public void testDestroyDuringBlockingRequest() throws Exception {
 
 				// Request all available buffers
 				for (int i = 0; i < numberOfBuffers; i++) {
-					requested.add(localBufferPool.requestBufferBlocking());
+					final Buffer buffer = localBufferPool.requestBuffer();
+					assertNotNull(buffer);
 
 Review comment:
   nit: with `checkNotNull` you can inline the not null check with the assignments/method
calls
   ```
   buffer = checkNotNull(localBufferPool.requestBuffer());
   ```
   or
   ```
   requested.add(checkNotNull(localBufferPool.requestBuffer());
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message