Overriding a method with a generic return type fails after adding a parameter
I wonder why this is a valid override: public abstract class A { public abstract <X> Supplier<X> getSupplier(); public static class B extends A { @Override public Supplier<String> getSupplier() { return String::new; } } } Whereas this is not: public abstract class A { public abstract <X> Supplier<X> getSuppliers(Collection<String> strings); public static class B extends A { @Override public Supplier<String> getSuppliers(Collection<String> strings) { return String::new; } } } According to JLS §8.4.8.1 , B.getSupplier must be a subsignature A.getSupplier : An instance method mC declared in or