Skip to content

[core] Optimize String format in CacheManager#7856

Merged
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:minor_cache_op
May 19, 2026
Merged

[core] Optimize String format in CacheManager#7856
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:minor_cache_op

Conversation

@JingsongLi
Copy link
Copy Markdown
Contributor

Purpose

Tests

Copy link
Copy Markdown
Contributor

@leaves12138 leaves12138 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

This change is a small cleanup in CacheManager: it switches from eager String.format(...) to the existing Preconditions.checkNotNull(reference, template, args...) overload, so the error message is only formatted on the null path. The checkNotNull overload supports %s templates, so the behavior remains equivalent when the cache lookup unexpectedly returns null.

I reviewed the diff and checked the corresponding Preconditions API. The existing failing CI job looks unrelated to this one-line change.

@JingsongLi JingsongLi merged commit 1bf8157 into apache:master May 19, 2026
11 of 12 checks passed
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.

2 participants