Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ImmutableList.copyOf with unmodifiableList in TestHiveGlueMetastore #14793

Closed
wants to merge 1 commit into from

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Oct 27, 2022

The value is nullable.

Description

Fix failure https://github.com/trinodb/trino/actions/runs/3335081229/jobs/5518683874

Release notes

(x) This is not user-visible or docs only and no release notes are required.

@ebyhr ebyhr added the no-release-notes This pull request does not require release notes entry label Oct 27, 2022
@cla-bot cla-bot bot added the cla-signed label Oct 27, 2022
@ebyhr ebyhr requested a review from findepi October 27, 2022 09:43
@@ -1453,7 +1454,7 @@ private static PartitionValues make(String... values)

private PartitionValues(List<String> values)
{
this.values = ImmutableList.copyOf(requireNonNull(values, "values is null"));
this.values = unmodifiableList(requireNonNull(values, "values is null"));
Copy link
Member

Choose a reason for hiding this comment

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

The value is nullable.

How come? You have requireNonNull.

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean the element, not values itself.

Copy link
Member

Choose a reason for hiding this comment

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

sorry, wasn't aware of this PR and posted #14799 as a streamlined verison of #14796 that @findinpath pinged me about

note that this change logically partially reverts bba041c -- the PartitionValues becomes mutable again.
You need a defensive copy of the constructor arg and wrapping with unmodifiableList

@ebyhr ebyhr closed this Oct 27, 2022
@ebyhr ebyhr deleted the ebi/glue-test branch October 27, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

3 participants