Skip to content

Commit e54d068

Browse files
authored
Update README violations to getViolations() (#175)
First time setting up protovalidate-java, following the example given in the readme `if (result.violations.isEmpty()) {` brings up the following error: ``` violations has private access in build.buf.protovalidate.ValidationResult ``` Can fix by modifying to `if (result.getViolations().isEmpty()) {`
1 parent 1f28be7 commit e54d068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public class Main {
108108
ValidationResult result = validator.validate(transaction);
109109

110110
// Check if there are any validation violations
111-
if (result.violations.isEmpty()) {
111+
if (result.getViolations().isEmpty()) {
112112
// No violations, validation successful
113113
System.out.println("Validation succeeded");
114114
} else {

0 commit comments

Comments
 (0)