From 6017691522ef59b1e713987ba71deaa0bfea9d94 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 17 Oct 2012 13:56:11 +0200 Subject: [PATCH] added an exception catch --- source/net/yacy/kelondro/util/FileUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/kelondro/util/FileUtils.java b/source/net/yacy/kelondro/util/FileUtils.java index 57f9b786c..e517ae4dd 100644 --- a/source/net/yacy/kelondro/util/FileUtils.java +++ b/source/net/yacy/kelondro/util/FileUtils.java @@ -463,7 +463,7 @@ public final class FileUtils { // search for unescaped = pos = line.indexOf('=', pos + 1); } while ( pos > 0 && line.charAt(pos - 1) == '\\' ); - if ( pos > 0 ) { + if ( pos > 0 ) try { String key = escaped_equal.matcher(line.substring(0, pos).trim()).replaceAll("="); key = escaped_newline.matcher(key).replaceAll("\n"); key = escaped_backslash.matcher(key).replaceAll("\\"); @@ -471,6 +471,8 @@ public final class FileUtils { value = value.replace("\\\\", "\\"); // does not work: escaped_backslashbackslash.matcher(value).replaceAll("\\"); //System.out.println("key = " + key + ", value = " + value); props.put(key, value); + } catch (IndexOutOfBoundsException e) { + Log.logException(e); } } return props;