You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2022/10/14 09:30:14 UTC
[incubator-eventmesh] branch master updated: [ISSUE #1537] Replace integer based for loop with foreach loop
This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 2c6231dd [ISSUE #1537] Replace integer based for loop with foreach loop
new 36c85b33 Merge pull request #1568 from captainbkarthick/master
2c6231dd is described below
commit 2c6231dd06f3298b631baab02383aed298396625
Author: Karthick B <ka...@tesco.com>
AuthorDate: Fri Oct 14 13:36:13 2022 +0530
[ISSUE #1537] Replace integer based for loop with foreach loop
---
.../apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
index bbab602d..b6184cf1 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
@@ -1063,8 +1063,8 @@ private static final long serialVersionUID = 0L;
if (!getConsumerGroupBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, consumerGroup_);
}
- for (int i = 0; i < heartbeatItems_.size(); i++) {
- output.writeMessage(5, heartbeatItems_.get(i));
+ for (HeartbeatItem heartbeatItem: heartbeatItems_) {
+ output.writeMessage(5, heartbeatItem);
}
unknownFields.writeTo(output);
}
@@ -1088,9 +1088,9 @@ private static final long serialVersionUID = 0L;
if (!getConsumerGroupBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, consumerGroup_);
}
- for (int i = 0; i < heartbeatItems_.size(); i++) {
+ for (HeartbeatItem heartbeatItem: heartbeatItems_) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, heartbeatItems_.get(i));
+ .computeMessageSize(5, heartbeatItem);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org