Skip to content

[MSHARED-925] remove guava dependency - #3

Merged
elharo merged 1 commit into
masterfrom
MSHARED-925
Jun 11, 2020
Merged

[MSHARED-925] remove guava dependency#3
elharo merged 1 commit into
masterfrom
MSHARED-925

Conversation

@elharo

@elharo elharo commented Jun 11, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@mthmulders mthmulders left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In all situations where you've applied Arrays.asList, you might consider using Collections.singletonList instead - it will not allocate a one-item array.

@elharo

elharo commented Jun 11, 2020

Copy link
Copy Markdown
Contributor Author

For test code it probably doesn't matter, but in general that's not a good idea. Collections.singletonList violates the Liskov Substitution Principle. This is a common design flaw in the Java Collections API and code that uses it.

@elharo
elharo merged commit 0142ee1 into master Jun 11, 2020
@elharo
elharo deleted the MSHARED-925 branch June 11, 2020 13:16
@jira-importer

Copy link
Copy Markdown

Resolve #72

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.

4 participants