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

Remove usages of com.google.common.base.Objects.firstNonNull #267

Merged
merged 1 commit into from May 13, 2021

Conversation

basil
Copy link
Member

@basil basil commented May 9, 2021

com.google.common.base.Objects#firstNonNull has been removed in recent versions of Guava, so consuming this API is a liability. This PR replaces usages of com.google.common.base.Objects#firstNonNull with native Java functionality to allow this plugin to be used seamlessly with any version of Guava in the future.

Copy link

@haugenj haugenj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@haugenj haugenj merged commit 85b4a97 into jenkinsci:master May 13, 2021
@basil basil deleted the firstNonNull branch May 13, 2021 21:31
@basil
Copy link
Member Author

basil commented Aug 7, 2021

Thanks @haugenj! Could this please be released?

@haugenj
Copy link

haugenj commented Aug 9, 2021

Yes I'll do this ASAP hopefully tomorrow

@haugenj
Copy link

haugenj commented Aug 10, 2021

Done!

Apologies on the delay, I was hoping to get some other changes in as well but have been wrapped up in other projects :/

@basil
Copy link
Member Author

basil commented Aug 10, 2021

Thank you! I think this takes care of the most pressing Guava compatibility issue for this plugin (removing com.google.common.base.Objects#firstNonNull). I described another potential compatibility concern in JENKINS-66310: the use of com.google.common.collect.MapMaker (some of whose methods have been removed in recent versions of Guava). I don't know for sure how big of an issue that will be, but it would certainly be safer to switch to the Caffeine API plugin and avoid the use of MapMaker if possible.

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.

None yet

2 participants