RFR: 8281561: Disable http DIGEST mechanism with MD5 by default [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Thu Mar 10 11:24:41 UTC 2022


On Thu, 10 Mar 2022 10:54:52 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java line 82:
>> 
>>> 80:         @SuppressWarnings("removal")
>>> 81:         String secprops = AccessController.doPrivileged(
>>> 82:             new PrivilegedAction<>() {
>> 
>> could use a lambda instead of an anonymous class?
>
> Had tried it first and compiler didn't know whether lambda is a PrivilegedAction or a PrivilegedExceptionAction, but it seems a cast works. Will change it.

or declare a local variable that holds the lambda - that would avoid the cast.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7688


More information about the net-dev mailing list