Class validation cleanups
daniel.smith at oracle.com
Fri Nov 8 21:04:51 UTC 2019
I've put together some JVMS change proposals to improve its specification of the class validation process, including class loading, format checking, and verification.
These are independent of Valhalla, but lay the groundwork for additional changes to the spec. They address things like:
- How are <init> and <clinit> methods constrained?
- Can array types be field/method receiver types? (Yes, it turns out.)
- When do we enforce the 'final' modifier on classes/methods?
- Which attributes are validated, and when?
- How does class loading handle anomalous situations?
For format checking refinements:
For class loading cleanup:
For attribute validation:
The last is the most disruptive, since we're proposing simply ignoring some attribute contents that has traditionally been parsed and validated. I think it may be reasonable to create a JEP for that piece.
More information about the valhalla-spec-observers