Support Guava DirectExecutorService

Description

JBehave starting from version 4.1 depends on Google/Guava library in version 19.0
SameThreadExecutors class in jbehave-core uses a Guava method: MoreExecutors.sameThreadExecutor(); that is deprecated in version 19 and is removed in newer versions.
According to the MoreExecutors#sameThreadExecutor javadoc:

Deprecated. Use directExecutor() if you only require an Executor and newDirectExecutorService() if you need a ListeningExecutorService. This method will be removed in August 2016.


The class MoreExecutors.sameThreadExecutor(); should use newest MoreExecutors.newDirectExecutorService(); instead of the deprecated method.

Activity

Show:

Mauro Talevi September 3, 2017 at 12:14 PM

Upgraded to Guava 20.0, as compatible with JDK 1.6.
Added DirectExecutorService and deprecated SameThreadExecutors.

Irko Krokodilko August 27, 2017 at 9:05 PM

Thank you for comments.
I've created a new pull request for this issue: https://github.com/jbehave/jbehave-core/pull/149
with updated version of google/guava to the latest 23.0
and also with changed the name of the executor.

Mauro Talevi August 27, 2017 at 12:02 PM

Don't you want to also upgrade the version of guava as well?

And shouldn't the name of the executor change?

Irko Krokodilko August 26, 2017 at 7:02 AM

I've created a pull request for this issue: https://github.com/jbehave/jbehave-core/pull/148
Please review it and consider to merge it, Thank You.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created August 26, 2017 at 5:52 AM
Updated September 8, 2017 at 2:05 PM
Resolved September 3, 2017 at 12:14 PM

Flag notifications