Skip to content

ECJ Relevant JDK Issues

Stephan Herrmann edited this page Feb 1, 2026 · 4 revisions

Collection of bugs in the OpenJDK bug tracker that are affecting compatibility between ecj - JLS - javac.

Wildcards and captures

Here my understanding is: JLS is "more correct" (in terms of type theory) than javac, but Oracle prefers not to change javac in "breaking" ways. I seem to recall several examples where even JDK libraries would need to be changed to be accepted by a corrected compiler.

With examples where ecj and javac are congruent:

Unchecked conversion / handling of raw types / erasure

Intersection types

In this category we might be dealing with some issues that don't have a ready, consistent answer in type theory.

Sub-optimal inference of standalone expressions

In this category type inference may produce a result sufficient for a standalone expression, but when the resolved type is used downstream, a "smarter" result may be desired. Think if a.m(b).c(d): a sub-optimal (but correct!) result of inferring a.m(b) may case inference for c(d) to fail.

Unspecified details of communication between inner and outer inference

In this category we have issues, that at a first glance might appear as implementation details not relevant for a specification, but since type inference is specified as an algorithm rather than in a declarative style, every aspect of that algorithm is relevant.

Clone this wiki locally