Author: toad
Date: 2007-05-23 17:49:28 +0000 (Wed, 23 May 2007)
New Revision: 13336
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Indenting
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-23
17:40:30 UTC (rev 13335)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-23
17:49:28 UTC (rev 13336)
@@ -1781,29 +1781,29 @@
private void checkSecondaryDatabaseError(Throwable ex) {
String msg = ex.getMessage();
if(ex instanceof DatabaseException) {
- if(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) {
- Logger.error(this, "Corrupt secondary database
("+getName()+") but could not create flag file "+fixSecondaryFile);
- System.err.println("Corrupt secondary database
("+getName()+") but could not create flag file "+fixSecondaryFile);
- return; // Not sure what else we can do
+ if(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) {
+ Logger.error(this, "Corrupt secondary
database ("+getName()+") but could not create flag file "+fixSecondaryFile);
+ System.err.println("Corrupt secondary
database ("+getName()+") but could not create flag file "+fixSecondaryFile);
+ return; // Not sure what else we can do
+ }
+ Logger.error(this, "Corrupt secondary database
("+getName()+"). Should be cleaned up on restart.");
+ System.err.println("Corrupt secondary database
("+getName()+"). Should be cleaned up on restart.");
+
System.exit(freenet.node.Node.EXIT_DATABASE_REQUIRES_RESTART);
+ } else if(ex instanceof DbChecksumException || ex
instanceof RunRecoveryException) {
+ System.err.println("Corrupt database! Will be
reconstructed on restart");
+ try {
+ reconstructFile.createNewFile();
+ } catch (IOException e) {
+ Logger.error(this, "Corrupt database
("+getName()+") but could not create flag file "+reconstructFile);
+ System.err.println("Corrupt database
("+getName()+") but could not create flag file "+reconstructFile);
+ return; // Not sure what else we can do
+ }
}
- Logger.error(this, "Corrupt secondary database
("+getName()+"). Should be cleaned up on restart.");
- System.err.println("Corrupt secondary database
("+getName()+"). Should be cleaned up on restart.");
-
System.exit(freenet.node.Node.EXIT_DATABASE_REQUIRES_RESTART);
- } else if(ex instanceof DbChecksumException || ex instanceof
RunRecoveryException) {
- System.err.println("Corrupt database! Will be
reconstructed on restart");
- try {
- reconstructFile.createNewFile();
- } catch (IOException e) {
- Logger.error(this, "Corrupt database
("+getName()+") but could not create flag file "+reconstructFile);
- System.err.println("Corrupt database
("+getName()+") but could not create flag file "+reconstructFile);
- return; // Not sure what else we can do
- }
}
- }
}
/**