Skip to content

Conversation

kang-hl
Copy link
Contributor

@kang-hl kang-hl commented Jul 31, 2023

Replace argument with empty array

@harawata
Copy link
Member

Hello @kang-hl ,

Could you explain the benefit of this change?

The javadoc says ...

If the set fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this set.

It means that an extra array is created if the argument is an empty array.

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

Successfully merging this pull request may close these issues.

2 participants