JDK-8336839 : Update BoundLookup/TableSwitchInstruction constructors to avoid redundant calculation
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Affected Version: 24
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-07-19
  • Updated: 2024-10-14
  • Resolved: 2024-10-09
Related Reports
Duplicate :  
Description
These 2 classes' constructors currently perform double-read and do not sanitize data on first read, to compute the instruction size. We can utilize flexible constructor bodies to perform the reading, validation, and even the final instance field assignment before the super constructor call.