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 7ca110e7b [improve] remove unnecessary if-else statement. (#1770)
7ca110e7b is described below

commit 7ca110e7b775e82e3e8cdcffecf6c9c7c6d41950
Author: Hyeon Sung <[email protected]>
AuthorDate: Thu Apr 18 12:08:10 2024 +0900

    [improve] remove unnecessary if-else statement. (#1770)
    
    Co-authored-by: tomsun28 <[email protected]>
---
 .../main/java/org/apache/hertzbeat/collector/util/CollectUtil.java   | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/collector/src/main/java/org/apache/hertzbeat/collector/util/CollectUtil.java 
b/collector/src/main/java/org/apache/hertzbeat/collector/util/CollectUtil.java
index 781d8c111..c80e606e3 100644
--- 
a/collector/src/main/java/org/apache/hertzbeat/collector/util/CollectUtil.java
+++ 
b/collector/src/main/java/org/apache/hertzbeat/collector/util/CollectUtil.java
@@ -167,10 +167,7 @@ public class CollectUtil {
      * assert prom field
      */
     public static Boolean assertPromRequireField(String aliasField) {
-        if (CommonConstants.PROM_TIME.equals(aliasField) || 
CommonConstants.PROM_VALUE.equals(aliasField)) {
-            return true;
-        }
-        return false;
+        return CommonConstants.PROM_TIME.equals(aliasField) || 
CommonConstants.PROM_VALUE.equals(aliasField);
     }
 
 


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

Reply via email to