[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



Hi Andreas,

Le 07/08/2020 à 13:40, Andreas Tille a écrit :
> Hi Thorsten,
> 
> On Thu, Aug 06, 2020 at 04:04:22PM +0200, Thorsten Glaser wrote:
>> On Thu, 6 Aug 2020, Andreas Tille wrote:
>>
>>> [ERROR] /build/jimfs-1.1/jimfs/src/main/java/com/google/common/jimfs/PathService.java:[290,30] error: <anonymous com.google.common.jimfs.PathService$1> is not abstract and does not override abstract method test(Object) in Predicate
>>
>> Change apply to test in line 292 (or let the IDE convert it to lambda).
> 
> I tried to implement this in
> 
>     https://salsa.debian.org/java-team/jimfs/-/commit/2d67acb2f577596a121622a94295407e22155eed
> 
> but this does not help much and the build issue remains.
>
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.
The definition in the patch is the same as in Predicate<T>. ``test'' is
a default method in the interface Predicate<T>, I thus don't see why it
needs an override... Nevertheless, this fixes the issue.

> 
> Thanks for the attempt to help anyway
> 
>        Andreas.
> 

All the best,
Pierre
Description: Providing Override of test method
Author: Pierre Gruet <pgtdebian@free.fr>
Last-Update: 2020-08-07

--- a/jimfs/src/main/java/com/google/common/jimfs/PathService.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/PathService.java
@@ -292,5 +292,10 @@
         public boolean apply(Object input) {
           return !input.toString().isEmpty();
         }
+        
+        @Override
+        public boolean test (Object input) {
+          return apply(input);
+        }
       };
 }

Reply to: