From cc97a3e9c682dd8b878261d13325e33163a66dbf Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 8 Sep 2006 20:27:45 +0000 Subject: [PATCH] fixed possibly bug with indexOutOfBoundsException git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2528 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/kelondro/kelondroRow.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/de/anomic/kelondro/kelondroRow.java b/source/de/anomic/kelondro/kelondroRow.java index 896aefb65..650676883 100644 --- a/source/de/anomic/kelondro/kelondroRow.java +++ b/source/de/anomic/kelondro/kelondroRow.java @@ -190,19 +190,15 @@ public class kelondroRow { if (nickref == null) genNickRef(); String nick; int p; - Object[] f; rowinstance = new byte[objectsize]; for (int i = 0; i < elts.length; i++) { p = elts[i].indexOf('='); if (p > 0) { nick = elts[i].substring(0, p).trim(); - f = (Object[]) nickref.get(nick); - if (f != null) { - System.arraycopy( - elts[i].substring(p + 1).trim().getBytes(), 0, - rowinstance, ((Integer) f[1]).intValue(), - ((kelondroColumn) f[0]).cellwidth()); - } + if (p + 1 == elts[i].length()) + setCol(nick, null); + else + setCol(nick, elts[i].substring(p + 1).trim().getBytes()); } } }