From 3d6933f7157f5b42ad0c4a516921c15458f32eb9 Mon Sep 17 00:00:00 2001 From: fankai Date: Wed, 1 May 2019 10:47:14 +0800 Subject: [PATCH] Fix validate message bug --- .../java/qunar/tc/qmq/producer/sender/NettyRouterManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmq-client/src/main/java/qunar/tc/qmq/producer/sender/NettyRouterManager.java b/qmq-client/src/main/java/qunar/tc/qmq/producer/sender/NettyRouterManager.java index f206f353..d87b3e57 100644 --- a/qmq-client/src/main/java/qunar/tc/qmq/producer/sender/NettyRouterManager.java +++ b/qmq-client/src/main/java/qunar/tc/qmq/producer/sender/NettyRouterManager.java @@ -68,8 +68,8 @@ public void validateMessage(Message message) { Map attrs = message.getAttrs(); if (attrs == null) return; for (Map.Entry entry : attrs.entrySet()) { - if (entry.getValue() == null) return; - if (!(entry.getValue() instanceof String)) return; + if (entry.getValue() == null) continue; + if (!(entry.getValue() instanceof String)) continue; String value = (String) entry.getValue(); if (value.length() > _32K) {