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

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


The following commit(s) were added to refs/heads/master by this push:
     new ceda4a65f [chore] delete the redundant else (#2881)
ceda4a65f is described below

commit ceda4a65f94827b5f92db4ecc9b80801b60b0955
Author: Ayu <[email protected]>
AuthorDate: Thu Dec 19 16:07:57 2024 +0800

    [chore] delete the redundant else (#2881)
    
    Co-authored-by: Ayu <[email protected]>
---
 .../src/main/java/org/apache/hertzbeat/common/entity/job/Job.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/job/Job.java
 
b/hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/job/Job.java
index 45afee380..a35d5594f 100644
--- 
a/hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/job/Job.java
+++ 
b/hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/job/Job.java
@@ -183,9 +183,8 @@ public class Job {
             Optional<Metrics> metric = e.stream().findAny();
             if (metric.isPresent()) {
                 return metric.get().getPriority();
-            } else {
-                return Byte.MAX_VALUE;
             }
+            return Byte.MAX_VALUE;
         }));
         envConfigmaps = new HashMap<>(8);
     }
@@ -229,9 +228,8 @@ public class Job {
             }
             Set<Metrics> source = priorMetrics.peek();
             return new HashSet<>(source);
-        } else {
-            return Collections.emptySet();
         }
+        return Collections.emptySet();
     }
 
     public void addCollectMetricsData(CollectRep.MetricsData metricsData) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to