eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Regression in 2026-09 RC1: Compiler considers method call with generics not applicable
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
The class
```
import java.io.Serializable;
import java.util.Comparator;
public class NullSafeComparableComparator implements Comparator, Serializable {
private static final long serialVersionUID = 1L;
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public int compare(T o1, T o2) {
Comparable c1 = (Comparable)o1;
Comparable c2 = (Comparable)o2;
return Comparator.nullsFirst(Comparator. naturalOrder()).compare(c1, c2);
}
}
```
compiles fine with Temurin 21.0.12 and in Eclipse 2026-06, but in Eclipse 2026-09 RC1 I get the error "The method nullsFirst(Comparator) in the type Comparator is not applicable for the arguments (Comparator)"
Contributor guide
Research direction
Start with the NullSafeComparableComparator reproducer in the issue and compare compilation under Temurin 21.0.12, Eclipse 2026-06, and Eclipse 2026-09 RC1. Trace the generic applicability diagnostic for Comparator.nullsFirst(Comparator.naturalOrder()). Done when the reproducer compiles as it did before the regression, with a regression test covering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100