RFR: 8374633: Bang in signatures should go before the type

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jan 6 18:21:26 UTC 2026


This PR tweaks signature generation so that bangs are added before the type being restricted, not after.

After fixing this I realized that no test was failing :-) so I added a separate compilation test to test `ClassReader`.
The test revealed some gaps in parsing of generic type test patterns with null-restriction, which I have fixed.

Also, the test revealed issues with type substitution, as type substitution was not preserving the null-restrictions in the "from" types. This is also now fixed.

-------------

Commit messages:
 - Initial push

Changes: https://git.openjdk.org/valhalla/pull/1860/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1860&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374633
  Stats: 121 lines in 7 files changed: 100 ins; 15 del; 6 mod
  Patch: https://git.openjdk.org/valhalla/pull/1860.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1860/head:pull/1860

PR: https://git.openjdk.org/valhalla/pull/1860


More information about the valhalla-dev mailing list