Skip to content

Commit 8d8450c

Browse files
committed
Simplify the code
1 parent 105b533 commit 8d8450c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/inf/AbstractEventProcessor.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
import java.util.Map;
4343
import java.util.Optional;
4444

45-
import org.slf4j.Logger;
46-
import org.slf4j.LoggerFactory;
47-
4845
import com.google.common.collect.Maps;
4946

5047
import lombok.extern.slf4j.Slf4j;
@@ -180,9 +177,9 @@ protected Map<String, Object> builderResponseHeaderMap(HttpEventWrapper requestW
180177
* @return Returns true if any is empty
181178
*/
182179
protected boolean validateSysHeader(Map<String, Object> sysHeaderMap) {
183-
return StringUtils.isAnyBlank(sysHeaderMap.get(ProtocolKey.ClientInstanceKey.IDC).toString()
184-
, sysHeaderMap.get(ProtocolKey.ClientInstanceKey.PID).toString(),
185-
sysHeaderMap.get(ProtocolKey.ClientInstanceKey.SYS).toString()) ||
186-
!StringUtils.isNumeric(sysHeaderMap.get(ProtocolKey.ClientInstanceKey.PID).toString());
180+
return StringUtils.isAnyBlank(sysHeaderMap.get(ProtocolKey.ClientInstanceKey.IDC).toString(),
181+
sysHeaderMap.get(ProtocolKey.ClientInstanceKey.PID).toString(),
182+
sysHeaderMap.get(ProtocolKey.ClientInstanceKey.SYS).toString())
183+
|| !StringUtils.isNumeric(sysHeaderMap.get(ProtocolKey.ClientInstanceKey.PID).toString());
187184
}
188185
}

0 commit comments

Comments
 (0)