Build/Compiling Spring Boot (2.0.2 Release) with Gradle 4.8, Goovy 2.4.12, Ant 1.9.11 on MacBookPro running JVM 1.8.0_25.
Failed to compile on package org.springframework.beans.support
class PropertyComparator. It seems there is a type mismatch at/around line 135.
Here is the error:
error: incompatible types:
PropertyComparator<CAP#1> cannot be converted to Comparator<? super CAP#1> source.sort(new PropertyComparator<>(sortDefinition));
where CAP#1 is a fresh type-variable: CAP#1 extends Object from capture of ?
Was able to get the class to compile by removing the generic at line 136:
Could you try a newer JDK 8 release please? There have been a few bugs in javac's generics handling in recent years, and our code is generally known to compile fine with recent JDK 8 releases (in particular JDK 8 update 102 and later).