You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/10/15 12:01:46 UTC
[GitHub] [flink] pnowojski commented on a change in pull request #9903:
[FLINK-14394][network] Remove unnecessary interface method
BufferProvider#requestBufferBlocking
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_r334906453
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/BufferPoolFactory.java
##########
@@ -49,10 +50,10 @@
* minimum number of network buffers in this pool
* @param maxUsedBuffers
* maximum number of network buffers this pool offers
- * @param owner
- * the optional owner of this buffer pool to release memory when needed
+ * @param bufferPoolOwner
+ * the owner of this buffer pool to release memory when needed
*/
- BufferPool createBufferPool(int numRequiredBuffers, int maxUsedBuffers, Optional<BufferPoolOwner> owner) throws IOException;
+ BufferPool createBufferPool(int numRequiredBuffers, int maxUsedBuffers, @Nullable BufferPoolOwner bufferPoolOwner) throws IOException;
Review comment:
Instead of `@Nullable` you can just use overloaded method without the special parameter.
We should avoid `@Nullable` parameters/return values.
Having `@Nullable` private field is a lesser evil, as it's encapsulated by the current class and the nullability is not leaking to the interface/class users.
----------------------------------------------------------------
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