LedgerTransaction transaction = null;
LINES:
while ((line = buf.readLine()) != null) {
+ if (isCancelled()) break;
if (!line.isEmpty() && (line.charAt(0) == ' ')) continue;
Matcher m;
- L(String.format("State is %d", state));
+ //L(String.format("State is %d", state));
switch (state) {
case ParserState.EXPECTING_JOURNAL:
if (line.equals("<h2>General Journal</h2>")) {
state));
}
}
- db.setTransactionSuccessful();
+ if (!isCancelled()) db.setTransactionSuccessful();
}
finally {
db.endTransaction();