charithe / kafka-junit

JUnit rule for spinning up a Kafka broker
Apache License 2.0
105 stars 45 forks source link

Upgrade Guava dependency to current version 27.0.1 #40

Closed fmthoma closed 5 years ago

fmthoma commented 5 years ago

Futures.transform(ListenableFuture, Function) has been deprecated for some time, and has been removed with Guava 26.0.

In order to work with newer versions of Guava, use the variant of transform with an explicit directExecutor. This does not change the semantics, the variant without the Executor parameter did in fact use directExecutor.

This change is backwards compatible, meaning that this should work with all versions of Guava that did work before: Both variants of transform() were added in Guava 9.0, and the deprecated one was removed in 26.0, so this particular line is compatible with 9.0 through 26.0 at least.

charithe commented 5 years ago

Thank you.

fmthoma commented 5 years ago

@charithe Thanks for merging! Could you build a release from master?

charithe commented 5 years ago

Hey, I don't think that this change alone warrants a full release. I am planning to let it go out with the next Kafka version update.

I did publish a snapshot release (4.1.4-SNAPSHOT) to Sonatype. If you absolutely need a release version with the latest Guava, a workaround might be to try shading the kafka-junit dependency.

charithe commented 5 years ago

Version 4.1.4 is now released