Skip to content

Commit b2cbe56

Browse files
committed
Corrected the results extraction in documentation
1 parent a824fe5 commit b2cbe56

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)