From 97596af84336b079a05392a0e252bfb476bc8af7 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 30 Nov 2006 14:24:41 +0000 Subject: [PATCH] patch for wrong old RWI entries git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3028 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/index/indexRWIEntryNew.java | 2 +- source/de/anomic/kelondro/kelondroRow.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/index/indexRWIEntryNew.java b/source/de/anomic/index/indexRWIEntryNew.java index 31dd574a0..6c97eb6cf 100644 --- a/source/de/anomic/index/indexRWIEntryNew.java +++ b/source/de/anomic/index/indexRWIEntryNew.java @@ -159,7 +159,7 @@ public class indexRWIEntryNew implements Cloneable, indexRWIEntry { this.entry.setCol(col_wordsInText, oldEntry.wordcount()); this.entry.setCol(col_phrasesInText, oldEntry.phrasecount()); this.entry.setCol(col_doctype, new byte[]{(byte) oldEntry.doctype()}); - this.entry.setCol(col_language, oldEntry.getLanguage(), null); + this.entry.setCol(col_language, (oldEntry.getLanguage() == null) ? "en" : oldEntry.getLanguage(), null); this.entry.setCol(col_llocal, 0); this.entry.setCol(col_lother, 0); int domlen = plasmaURL.domLengthEstimation(oldEntry.urlHash()); diff --git a/source/de/anomic/kelondro/kelondroRow.java b/source/de/anomic/kelondro/kelondroRow.java index b00f3755c..bd006f1f6 100644 --- a/source/de/anomic/kelondro/kelondroRow.java +++ b/source/de/anomic/kelondro/kelondroRow.java @@ -297,7 +297,7 @@ public class kelondroRow { setCol(column, cell.getBytes()); else try { - setCol(column, cell.getBytes(encoding)); + setCol(column, (cell == null) ? null : cell.getBytes(encoding)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); }