From 2ad726523d13018e0d7a0f3bab4d51847e3ed19c Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 13 Oct 2017 14:32:01 +0900 Subject: [PATCH] bug fix --- .../overflow/redis/service/RedisMessagePublisher.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/loafle/overflow/redis/service/RedisMessagePublisher.java b/src/main/java/com/loafle/overflow/redis/service/RedisMessagePublisher.java index 7f18209..b6a4233 100644 --- a/src/main/java/com/loafle/overflow/redis/service/RedisMessagePublisher.java +++ b/src/main/java/com/loafle/overflow/redis/service/RedisMessagePublisher.java @@ -97,7 +97,11 @@ public class RedisMessagePublisher implements MessagePublisher { List results = new ArrayList<>(params.length); try { for (Object param : params) { - results.add(objectMapper.writeValueAsString(param)); + if (param.getClass().equals(String.class)) { + results.add((String)param); + } else { + results.add(objectMapper.writeValueAsString(param)); + } } } catch (IOException e) { e.printStackTrace();