From 6425963ceec9f4807d22000cd3b11c574ff44f93 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 10 Jan 2018 18:38:42 +0100 Subject: [PATCH] Fixed internal tables exact value match iterator --- source/net/yacy/kelondro/blob/Tables.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/net/yacy/kelondro/blob/Tables.java b/source/net/yacy/kelondro/blob/Tables.java index e755df1cc..ec4cb3205 100644 --- a/source/net/yacy/kelondro/blob/Tables.java +++ b/source/net/yacy/kelondro/blob/Tables.java @@ -31,6 +31,7 @@ import java.io.File; import java.io.IOException; import java.text.ParseException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Date; import java.util.HashMap; @@ -48,7 +49,6 @@ import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.util.ByteArray; -import net.yacy.cora.util.ByteBuffer; import net.yacy.cora.util.ConcurrentLog; import net.yacy.cora.util.LookAheadIterator; import net.yacy.cora.util.SpaceExceededException; @@ -577,7 +577,9 @@ public class Tables implements Iterable { while (this.i.hasNext()) { r = new Row(this.i.next()); if (this.whereValue != null) { - if (ByteBuffer.equals(r.get(this.whereColumn), this.whereValue)) return r; + if (Arrays.equals(r.get(this.whereColumn), this.whereValue)) { + return r; + } } else if (this.wherePattern != null) { if (this.whereColumn == null) { // shall match any column @@ -681,7 +683,7 @@ public class Tables implements Iterable { if (map == null) continue; r = new Row(pk, map); if (this.whereValue != null) { - if (ByteBuffer.equals(r.get(this.whereColumn), this.whereValue)) return r; + if (Arrays.equals(r.get(this.whereColumn), this.whereValue)) return r; } else if (this.wherePattern != null) { if (this.whereColumn == null) { // shall match any column