On Thu, 17 Jun 2021 14:27:30 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> test/jdk/java/security/ProtectionDomain/RecursionDebug.java line 91:
>> 
>>> 89:         }
>>> 90: 
>>> 91:         System.setSecurityManager(null);
>> 
>> Why did this line need to be removed?
>
> This is where the `setSecurityManager` method is called again when a security 
> manager has already been installed, and the `getProtectionDomain` permission 
> is needed. While I can add the new permission into the policy file, my 
> understanding is that this line was just a clean-up and the test was about 
> implementation of `ProtectionDomain::toString` (esp the `seeAllp` method 
> called by it) when debug is on.

Ok, thanks for the explanation. I think it should be ok to remove this line 
then.

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

PR: https://git.openjdk.java.net/jdk17/pull/13

Reply via email to