Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added an exception catch

Michael Peter Christen6017691522ef
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;