Review 8035808: Eliminate dependency to GetPropertyAction and other sun.security.action convenient classes (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Fri Mar 7 11:50:55 UTC 2014
- Previous message: Review 8035808: Eliminate dependency to GetPropertyAction and other sun.security.action convenient classes
- Next message: Review 8035808: Eliminate dependency to GetPropertyAction and other sun.security.action convenient classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/03/2014 11:39, Peter Levart wrote:
Maybe, if PrivilegedAction interface could be retrofitted as follows: public interface PrivilegedExceptionAction { T run() throws Exception; } public interface PrivilegedAction extends PrivilegedExceptionAction { @Override T run(); }
Then in majority of cases where lambda body did not throw a checked exception, the most-specific rule would choose the doPrivileged(PrivilegedAction) method automatically... For checked-exceptional-cases the cast would still be needed. There was a discussion on security-dev about this some time ago and this bug created: https://bugs.openjdk.java.net/browse/JDK-8019851
I hope it will be looked at again in 9 as it is an inconvenience in the JDK (but perhaps not as much outside of the JDK where it's not going to be used very much).
-Alan.
- Previous message: Review 8035808: Eliminate dependency to GetPropertyAction and other sun.security.action convenient classes
- Next message: Review 8035808: Eliminate dependency to GetPropertyAction and other sun.security.action convenient classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]