On Thu, 13 Oct 2022 13:18:58 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Aleksei Efimov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Change checkInput to be the global filter centric
>
> src/java.naming/share/classes/javax/naming/spi/NamingManager.java line 109:
> 
>> 107:      * @see java.lang.SecurityManager#checkSetFactory
>> 108:      */
>> 109:     public static synchronized void setObjectFactoryBuilder(
> 
> Perhaps remove the `synchronized` from this method and the getter, now that 
> the synchronization has moved to the `NamingManagerHelper` class?

Agreed - I think it is safe to remove `synchronized`. I doubt that there is a 
code that relies on `synchronized (javax.naming.spi.NamingManager.class)` to 
prevent other code setting the factory builder (also it can be set only once), 
therefore it should be ok to remove `synchronized`.

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

PR: https://git.openjdk.org/jdk/pull/10578

Reply via email to