RFR: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs [v2]

Weijun Wang weijun at openjdk.java.net
Mon Oct 25 18:30:13 UTC 2021


On Fri, 22 Oct 2021 22:07:50 GMT, Bernd <duke at openjdk.java.net> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   renames
>
> test/jdk/javax/security/auth/Subject/DoAs.java line 44:
> 
>> 42:             final int index = i;
>> 43:             Subject.callAs(subject, () -> {
>> 44:                 Subject s = Subject.current();
> 
> Should it Test old and new method to retrieve subject?

I did it in `CurrentSubject.java` when test=both (checking `cas != accs` in `check()`). All changes to existing tests are just to avoid calling deprecated methods.

> test/jdk/sun/security/krb5/KrbCredSubKey.java line 34:
> 
>> 32: 
>> 33: import java.io.FileOutputStream;
>> 34: import java.util.concurrent.Callable;
> 
> Should those tests run with both permutations of the system property?

I did ran it but not sure if it's good  to add an extra `@run` to all tests. I'll select a few.

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

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



More information about the security-dev mailing list