[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: jimfs: FTBFS: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project jimfs: Compilation failure

On Fri, 7 Aug 2020, Pierre Gruet wrote:

> I suggest using the enclosed patch, which allows the build to succeed by
> overriding the ``test'' method of Predicate<T>. The ``apply'' method
> provided by upstream has to be kept as it is used by the ``test'' method.

But why? This amount of redundancy is… ridiculous.

private static final Predicate<Object> NOT_EMPTY =
      new Predicate<Object>() {
        public boolean apply(Object input) {
          return !input.toString().isEmpty();

I was just suggesting replacing this with…

private static final Predicate<Object> NOT_EMPTY =
	input -> !input.toString().isEmpty();

… but then I saw https://stackoverflow.com/q/41930727/2171120
and the code from jimfs seems to use Guava, not standard Java:

import com.google.common.collect.Iterables;
import com.google.common.base.Predicate;

Looking at guava/src/com/google/common/base/Predicate.java in
the Debian source package guava-libraries (29.0-5) I see:

 * <p>As this interface extends {@code java.util.function.Predicate}, an instance of this type may
 * be used as a {@code Predicate} directly. To use a {@code java.util.function.Predicate} where a
 * {@code com.google.common.base.Predicate} is expected, use the method reference {@code
 * predicate::test}.
 * <p>This interface is now a legacy type. Use {@code java.util.function.Predicate} (or the

This means the correct patch is more like… ugh, this is more complicated.
Also, com.google.common.base.Predicate implements a default test method.

In addition, for some reason, jimfs still builds for Java 7.

Gimme a bit, I’ll build it locally, now I found the Debian packaging.

tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

Reply to: