Author: toad
Date: 2007-05-18 18:18:35 +0000 (Fri, 18 May 2007)
New Revision: 13264
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Maybe avoid NPE
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-18
17:49:53 UTC (rev 13263)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-18
18:18:35 UTC (rev 13264)
@@ -1776,8 +1776,9 @@
private void checkSecondaryDatabaseError(Throwable ex) {
String msg = ex.getMessage();
- if((ex instanceof DatabaseException) && (msg != null &&
(msg.indexOf("missing key in the primary database") > -1) ||
- msg.indexOf("the primary record contains a key
that is not present in the secondary") > -1)) {
+ if((ex instanceof DatabaseException) && (msg != null &&
+ ((msg.indexOf("missing key in the primary
database") > -1) ||
+ msg.indexOf("the primary record contains a key
that is not present in the secondary") > -1))) {
try {
fixSecondaryFile.createNewFile();
} catch (IOException e) {