Skip to content

Commit 245bb28

Browse files
authored
Merge pull request #629 from digital-preservation/correction-for-api-usage-in-readme
Corrected the results extraction in documentation
2 parents a824fe5 + b2cbe56 commit 245bb28

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Example Java code of using the CSV Validator through the Java API:
7575
csvReader, csvSchemaReader
7676
)
7777

78-
List<FailMessage> messages = validateWithStringNames
78+
Result result = validateWithStringNames
7979
.usingCsvEncoding(csvEncoding, validateCsvEncoding) // should only be `true` if using UTF-8 encoding, otherwise it will throw an exception
8080
.usingCsvSchemaEncoding(csvSchemaEncoding)
8181
.usingFailFast(failFast)
@@ -87,6 +87,8 @@ Example Java code of using the CSV Validator through the Java API:
8787
.usingMaxCharsPerCell(maxCharsPerCell)
8888
.runValidation();
8989

90+
List<FailMessage> messages = ((CsvValidatorJavaBridge.ValidationResult)(result)).errors();
91+
9092
if(messages.isEmpty()) {
9193
System.out.println("All worked OK");
9294
} else {

0 commit comments

Comments
 (0)