Skip to content

Add lazy message evaluation to ProcessorErrors.checkState#5169

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_916102272
May 15, 2026
Merged

Add lazy message evaluation to ProcessorErrors.checkState#5169
copybara-service[bot] merged 1 commit into
masterfrom
test_916102272

Conversation

@copybara-service
Copy link
Copy Markdown

Add lazy message evaluation to ProcessorErrors.checkState

This change introduces new overloads of ProcessorErrors.checkState that accept a Supplier<String> for the error message. This allows the error message to be constructed only when the check fails, avoiding unnecessary work when the condition is true.

Existing usages in AndroidEntryPointMetadata and Processors are updated to use these new overloads for XAnnotation.toStableString(), as these can be expensive.

RELNOTES=N/A

This change introduces new overloads of `ProcessorErrors.checkState` that accept a `Supplier<String>` for the error message. This allows the error message to be constructed only when the check fails, avoiding unnecessary work when the condition is true.

Existing usages in `AndroidEntryPointMetadata` and `Processors` are updated to use these new overloads for `XAnnotation.toStableString()`, as these can be expensive.

RELNOTES=N/A
PiperOrigin-RevId: 916143466
@copybara-service copybara-service Bot merged commit 2a5862a into master May 15, 2026
@copybara-service copybara-service Bot deleted the test_916102272 branch May 15, 2026 20:01
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