Removing invalid System.exit

This commit is contained in:
Clebert Suconic 2016-01-23 16:42:37 -05:00
parent 7957f574f6
commit 928ec603aa
1 changed files with 2 additions and 4 deletions

View File

@ -280,7 +280,7 @@ public class JournalFilesRepository {
ActiveMQJournalLogger.LOGGER.checkFiles();
ActiveMQJournalLogger.LOGGER.info(debugFiles());
ActiveMQJournalLogger.LOGGER.seqOutOfOrder();
System.exit(-1);
throw new IllegalStateException("Sequence out of order");
}
if (journal.getCurrentFile() != null && journal.getCurrentFile().getFileID() <= file.getFileID()) {
@ -356,9 +356,7 @@ public class JournalFilesRepository {
calculatedSize = file.getFile().size();
}
catch (Exception e) {
e.printStackTrace();
System.out.println("Can't get file size on " + file);
System.exit(-1);
throw new IllegalStateException(e.getMessage() + " file: " + file);
}
if (calculatedSize != fileSize) {
ActiveMQJournalLogger.LOGGER.deletingFile(file);