RFR: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation [v3]

Aleksei Efimov aefimov at openjdk.org
Thu Oct 13 19:23:53 UTC 2022


On Thu, 13 Oct 2022 13:18:58 GMT, Jaikiran Pai <jpai at 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


More information about the core-libs-dev mailing list