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

gaoyunhaii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b3d6502974 [FLINK-27220][runtime] Remove redundant null-check for 
primitive parameters
9b3d6502974 is described below

commit 9b3d6502974f9b02d2494afcd82dcead3ac35ebc
Author: dkkb <[email protected]>
AuthorDate: Wed Apr 13 17:20:04 2022 +0800

    [FLINK-27220][runtime] Remove redundant null-check for primitive parameters
    
    This closes #19454.
---
 .../rest/messages/job/SubtaskExecutionAttemptAccumulatorsInfo.java    | 4 ++--
 .../flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/SubtaskExecutionAttemptAccumulatorsInfo.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/SubtaskExecutionAttemptAccumulatorsInfo.java
index 02e47253da0..50e035e700c 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/SubtaskExecutionAttemptAccumulatorsInfo.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/SubtaskExecutionAttemptAccumulatorsInfo.java
@@ -56,8 +56,8 @@ public class SubtaskExecutionAttemptAccumulatorsInfo 
implements ResponseBody {
             @JsonProperty(FIELD_NAME_USER_ACCUMULATORS)
                     Collection<UserAccumulator> userAccumulatorList) {
 
-        this.subtaskIndex = Preconditions.checkNotNull(subtaskIndex);
-        this.attemptNum = Preconditions.checkNotNull(attemptNum);
+        this.subtaskIndex = subtaskIndex;
+        this.attemptNum = attemptNum;
         this.id = Preconditions.checkNotNull(id);
         this.userAccumulatorList = 
Preconditions.checkNotNull(userAccumulatorList);
     }
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java
index 200e1f6e742..18f50ea8b83 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfiguration.java
@@ -120,9 +120,9 @@ public class TaskManagerServicesConfiguration {
         this.localCommunicationOnly = localCommunicationOnly;
         this.tmpDirPaths = checkNotNull(tmpDirPaths);
         this.localRecoveryStateDirectories = 
checkNotNull(localRecoveryStateDirectories);
-        this.localRecoveryEnabled = checkNotNull(localRecoveryEnabled);
+        this.localRecoveryEnabled = localRecoveryEnabled;
         this.queryableStateConfig = queryableStateConfig;
-        this.numberOfSlots = checkNotNull(numberOfSlots);
+        this.numberOfSlots = numberOfSlots;
 
         this.pageSize = pageSize;
 

Reply via email to