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/05/10 09:49:13 UTC

[GitHub] [flink] StephanEwen commented on a change in pull request #8236: [FLINK-12289][flink-runtime]Fix bugs and typos in Memory manager

StephanEwen commented on a change in pull request #8236: [FLINK-12289][flink-runtime]Fix bugs and typos in Memory manager
URL: https://github.com/apache/flink/pull/8236#discussion_r282818545
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
 ##########
 @@ -387,11 +387,11 @@ public void release(MemorySegment segment) {
 	 *
 	 * @param segments The segments to be released.
 	 * @throws NullPointerException Thrown, if the given collection is null.
-	 * @throws IllegalArgumentException Thrown, id the segments are of an incompatible type.
+	 * @throws IllegalArgumentException Thrown, if the segments are of an incompatible type.
 	 */
 	public void release(Collection<MemorySegment> segments) {
 		if (segments == null) {
-			return;
+			throw new NullPointerException();
 
 Review comment:
   Unless there is a real bug caused by this in some setup, I would not change this.
   Such changes often have unforeseen side effects, so I would avoid doing them for "looks better" or "looks more correct" reasons.

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