Keeping `new Integer` source compatibility with unnamed factory method

Mateusz Romanowski romanowski.mateusz at gmail.com
Wed Nov 4 20:07:35 UTC 2020


Hi All,
regarding the summary of the last EG meeting (2020-11-04) [1], I can see a
future me being frustrated with having to keep some dusty `javac` only
because of some _mature_ code generation tool that "optimizes" by using
`Integer::new`.

Is the "something special" to keep `Integer::new` source compatibility
adding an `Integer::new` (and similarly `Object::new`) unnamed factory
method?

Sorry if I have missed any material discussions related to such an idea.

Cheers,
Mateusz Romanowski

[1]
https://mail.openjdk.java.net/pipermail/valhalla-spec-experts/2020-November/001446.html
[2]
http://cr.openjdk.java.net/~dlsmith/special-methods/special-methods-20200210/specs/factory-methods-jvms.html#jvms-2.9.4


More information about the valhalla-dev mailing list