You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by az...@apache.org on 2020/05/19 07:46:56 UTC

[flink] 04/04: [hotfix] remove IntelliJ '//noinspection ...' directives from MemoryManager

This is an automated email from the ASF dual-hosted git repository.

azagrebin pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b8fcdd66f98efbab05db25e028c9ebdc585c3155
Author: Andrey Zagrebin <az...@apache.org>
AuthorDate: Thu Apr 23 17:25:28 2020 +0300

    [hotfix] remove IntelliJ '//noinspection ...' directives from MemoryManager
---
 .../src/main/java/org/apache/flink/runtime/memory/MemoryManager.java  | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java b/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
index 948053a..bb26549 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
@@ -304,7 +304,6 @@ public class MemoryManager {
 			// if not, we can change it to the simpler approach for the better readability.
 			Iterator<MemorySegment> segmentsIterator = segments.iterator();
 
-			//noinspection ProhibitedExceptionCaught
 			try {
 				MemorySegment segment = null;
 				while (segment == null && segmentsIterator.hasNext()) {
@@ -576,7 +575,6 @@ public class MemoryManager {
 	 * @return The size of the pages handled by the memory manager.
 	 */
 	public int getPageSize() {
-		//noinspection NumericCastThatLosesPrecision
 		return (int) pageSize;
 	}
 
@@ -611,7 +609,6 @@ public class MemoryManager {
 			throw new IllegalArgumentException("The fraction of memory to allocate must within (0, 1].");
 		}
 
-		//noinspection NumericCastThatLosesPrecision
 		return (int) (totalNumberOfPages * fraction);
 	}
 
@@ -626,7 +623,6 @@ public class MemoryManager {
 			fraction > 0 && fraction <= 1,
 			"The fraction of memory to allocate must within (0, 1], was: %s", fraction);
 
-		//noinspection NumericCastThatLosesPrecision
 		return (long) Math.floor(memoryBudget.getTotalMemorySize() * fraction);
 	}