From 1a44afed05cdfd98a0f77241f63966119d61322f Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 29 Jun 2015 13:16:52 +0200 Subject: [PATCH] Don't convert possibly corrupted bytes to UTF-8 If the translog UUID is corrupted we should not convert it to UTF-8 since it might be invalid. Instead we should compare the UTF-8 byte representation directly. --- .../org/elasticsearch/index/translog/TranslogReader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java b/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java index 769905ae75e..c7feb8d19c3 100644 --- a/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java +++ b/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java @@ -233,8 +233,9 @@ public abstract class TranslogReader implements Closeable, Comparable