From fa935e832acecf258905d2dafb883c98f14d9580 Mon Sep 17 00:00:00 2001 From: Silverados <295843706@qq.com> Date: Fri, 24 Sep 2021 17:39:54 +0800 Subject: [PATCH] fix document mistake (#3304) message.getBody() return byte[], so change to length. --- docs/en/Example_Batch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Example_Batch.md b/docs/en/Example_Batch.md index 11bb42ff..06461bb5 100644 --- a/docs/en/Example_Batch.md +++ b/docs/en/Example_Batch.md @@ -57,7 +57,7 @@ public class ListSplitter implements Iterator> { return currIndex; } private int calcMessageSize(Message message) { - int tmpSize = message.getTopic().length() + message.getBody().length(); + int tmpSize = message.getTopic().length() + message.getBody().length; Map properties = message.getProperties(); for (Map.Entry entry : properties.entrySet()) { tmpSize += entry.getKey().length() + entry.getValue().length(); @@ -78,4 +78,4 @@ while (splitter.hasNext()) { // handle the error } } -``` \ No newline at end of file +``` -- GitLab