jenkinsci / jms-messaging-plugin

https://plugins.jenkins.io/jms-messaging
12 stars 38 forks source link

Replace deprecated guava method #233

Closed dhodovsk closed 2 years ago

dhodovsk commented 2 years ago
sturivny commented 2 years ago

Hello, I'm also interested in this fix.

msrb commented 2 years ago

Good catch.

I think this will also require jenkins.version bump in pom.xml(s). The problem might be that the new guava is only available in the very latest LTS 2.332.1. MoreObjects class was added in guava 18.0 and older Jenkins unfortunately bundles prehistoric 11.0.

If the jump to the latest LTS would be too harsh, then maybe we could simply reimplement the firstNonNull() method in the plugin (it's a trivial helper function).

msrb commented 2 years ago

@olivergondza WDYT?

olivergondza commented 2 years ago

All affected methods can be replaced by Jenkins existing helpers: https://github.com/jenkinsci/jms-messaging-plugin/pull/234

olivergondza commented 2 years ago

This fix is released as 1.1.27. Thanks for the report.