On Tue, 19 Nov 2024 20:43:25 GMT, Sean Mullan <mul...@openjdk.org> wrote:

> Now that JEP 486 has been integrated, `java.security.jgss` and 
> `jdk.security.jgss` module dependencies on `System.getSecurityManager` and 
> `AccessController.doPrivileged*` can be removed.
> 
> There is an undocumented property named "sun.security.krb5.autodeducerealm" 
> that can probably be removed as it only affected behavior when an SM was 
> enabled; however I have left the code that reads the property as-is (see 
> sun/security/krb5/Realm.java) and have opened a separate issue to determine 
> if it can be safely removed.

src/java.security.jgss/share/classes/sun/security/jgss/GSSUtil.java line 367:

> 365:                 });
> 366:             return creds;
> 367:         } catch (PrivilegedActionException pae) {

The `PrivilegedExceptionAction` never throws a checked exception, so it was not 
necessary to retain the code inside the catch block.

src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5Context.java 
line 665:

> 663:                                 }});
> 664:                             kerbTicket = tmp;
> 665:                         } catch (PrivilegedActionException e) {

The PrivilegedExceptionAction never throws a checked exception, so it was not 
necessary to retain the code inside the catch block.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22256#discussion_r1849039807
PR Review Comment: https://git.openjdk.org/jdk/pull/22256#discussion_r1849040940

Reply via email to