Skip to content

Navigation Menu

Sign in
Sign up

Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors. - #8475

Open
copybara-service[bot] wants to merge 1 commit into
master from
test_928611528
Open

Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors. #8475
copybara-service[bot] wants to merge 1 commit into
master from
test_928611528

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jun 12, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors.

RELNOTES=Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors.

copybara-service Bot force-pushed the test_928611528 branch 2 times, most recently from 36e30b3 to ab8fd77 Compare June 15, 2026 20:24
@copybara-service copybara-service Bot changed the title (削除) Added @InlineMe annotations to Lists.newArrayList() and Lists.newLinkedList(). (削除ここまで) (追記) Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors. (追記ここまで) Jun 15, 2026
...tions that directly delegate to JDK constructors.
RELNOTES=Added @InlineMe annotations to all deprecated collection factory functions that directly delegate to JDK constructors.
PiperOrigin-RevId: 928611528

Copy link
Copy Markdown

alus

Comment on lines +456 to 462
@InlineMe(
replacement = "new EnumMap<>(checkNotNull(type))",
imports = "java.util.EnumMap",
staticImports = "com.google.common.base.Preconditions.checkNotNull")
public static <K extends Enum<K>, V extends @Nullable Object> EnumMap<K, V> newEnumMap(
Class<K> type) {
return new EnumMap<>(checkNotNull(type));

@ExE-Boss ExE-Boss Aug 6, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note that this null check is also performed by the implementation of the EnumMap constructor, and is thus redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@ExE-Boss ExE-Boss ExE-Boss left review comments
Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /