Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions conformance/expected-failures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ kitchen_sink:
standard_rules/repeated:
- items/in/invalid
- items/not_in/invalid
library/is_ip:
- version/6/invalid/ipv6/7h16_double_colon_1h16
- version/6/invalid/ipv6/7h16_double_colon
- version/6/invalid/ipv6/double_colon_8h16
- version/6/invalid/ipv6/1h16_double_colon_7h16
standard_rules/well_known_types/duration:
- in/invalid
- not in/invalid


6 changes: 5 additions & 1 deletion src/main/java/build/buf/protovalidate/Ipv6.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ private boolean addressPart() {
break;
}

return this.doubleColonSeen || this.pieces.size() == 8;
int totalPieces = this.pieces.size();
if (this.doubleColonSeen) {
return totalPieces < 8;
}
return totalPieces == 8;
}

/**
Expand Down