Skip to content

Commit

Permalink
Minor fixes to new code (JENA-1434)
Browse files Browse the repository at this point in the history
- Logic error in hadErrors() and hadWarnings()
- Minor formatting
  • Loading branch information
rvesse authored and afs committed Nov 28, 2017
1 parent bb0542e commit f733d88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ public long getWarningCount() {
}

public boolean hadErrors() {
return this.errorCount > 1;
return this.errorCount > 0;
}

public boolean hadWarnings() {
return this.warningCount > 1;
return this.warningCount > 0;
}

public boolean hadIssues() {
Expand Down
4 changes: 3 additions & 1 deletion jena-cmds/src/main/java/riotcmd/CmdLangParse.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ protected ParseRecord parseRIOT(RDFParserBuilder builder, /*Info for the Process
checking = false;
builder.checking(checking);

ErrorHandlerTracking errHandler = ErrorHandlerFactory.errorHandlerTracking(ErrorHandlerFactory.stdLogger, modLangParse.stopOnBadTerm(), modLangParse.stopOnWarnings());
ErrorHandlerTracking errHandler = ErrorHandlerFactory.errorHandlerTracking(ErrorHandlerFactory.stdLogger,
modLangParse.stopOnBadTerm(),
modLangParse.stopOnWarnings());

if ( modLangParse.skipOnBadTerm() ) {
// skipOnBadterm - this needs collaboration from the parser.
Expand Down

0 comments on commit f733d88

Please sign in to comment.