aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

Constructor access to box types should be restricted #349

Closed jeff-aion closed 5 years ago

jeff-aion commented 5 years ago

As of JDK 9, calls like new Integer have been deprecated in favour of Integer.valueOf (this is true for the other box types, as well).

While we don't use any constants for these cases, aside from Boolean, we still support these valueOf calls. Given that we haven't yet released and we are targeting a JDK 10 user-space (where these constructors were deprecated in JDK 9), we should restrict access to these constructors.