On Fri, 9 Apr 2021 16:30:05 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Thanks for the suggestion Roger, I think the `privilegedGetProperty(prop, >> default)` for the `getProperty()` method looks great. >> >> WRT to using it for `getInt()` and `getLong()`, I think its reasonable to >> use other means for these methods in the interest of consistency due to, as >> you pointed out, only `int` being supported. Would you think? Or would it be >> better to use the same means in all 3 methods? > > Its a slippery slope that might require a bit more investigation to check the > expected value sizes to see if a change to the number of bits in the value > for each property might break something. Technical debt can take you down a > rabbit hole. Quickest to just convert to the lamba as you proposed. I have stuck with the lambda conversion solution in the [current changes](https://github.com/openjdk/jdk/pull/3416/commits/1746840eaa9a8de34d89d73d993e2f86aa0d0ed3), however WRT to Alan's previous feedback on creating a PrivilegedAction explicitly as it makes everything a bit more readable. ------------- PR: https://git.openjdk.java.net/jdk/pull/3416