When the JVM was originally drawn up, the designers had the CONSTANT_Long_info
and CONSTANT_Double_info
structures in the constant pool take up 2 entries (supposedly because that way you could index the constant pool by 4-byte alignment or something along those lines).
However, according to the JVM 10 specification, that has not been changed.
If changing it would require changes to a lot of code it would make sense since the JVM is supposed to be able to run code built for older JVMs, but it seems to me that it would require very few changes with a conditional to determine if you're dealing with a class from an earlier version — the only times it's relevant are if you're initializing the constant pool or if you're iterating over it, which doesn't happen very often and is riddled with conditionals anyways.
Besides, far larger breaking changes such as Java 9 modules have been introduced in the past. So, why is it still like that today? Is there an architectural reason, or is it just not worth anyone's time so far?