Skip to content

Add the CelIp opaque value representation (net.IP) to support the CEL network extension library (cel.lib.ext.network) in Java with parity against cel-go and cel-spec. - #1483

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1024996980

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Add the CelIp opaque value representation (net.IP) to support the CEL network extension library (cel.lib.ext.network) in Java with parity against cel-go and cel-spec.

CelIp extends OpaqueValue directly using immutable primitive fields for Java 8, ErrorProne @Immutable and @CheckReturnValue, and Android (CelLiteRuntime) compatibility without external networking dependencies. Parsing enforces strict netip and RFC 4291 rules (rejecting leading zeros in IPv4 octets, zone identifiers, and IPv4-mapped IPv6 addresses) and formats canonical strings per RFC 5952. Also register net.IP in DefaultTypeProvider and resolve CelValue type names in TypeResolver.resolveTypeName so opaque type identifiers and runtime error diagnostics report net.IP.

… CEL network extension library (`cel.lib.ext.network`) in Java with parity against `cel-go` and `cel-spec`.

`CelIp` extends `OpaqueValue` directly using immutable primitive fields for Java 8, ErrorProne `@Immutable` and `@CheckReturnValue`, and Android (`CelLiteRuntime`) compatibility without external networking dependencies. Parsing enforces strict `netip` and RFC 4291 rules (rejecting leading zeros in IPv4 octets, zone identifiers, and IPv4-mapped IPv6 addresses) and formats canonical strings per RFC 5952. Also register `net.IP` in `DefaultTypeProvider` and resolve `CelValue` type names in `TypeResolver.resolveTypeName` so opaque type identifiers and runtime error diagnostics report `net.IP`.

PiperOrigin-RevId: 1024996980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant