On Tue, 31 Jan 2023 16:19:34 GMT, Aleksei Efimov <aefi...@openjdk.org> wrote:
> The proposed change adds a new exception handler method to the > `test/jdk/com/sun/jndi/ldap/lib/BaseLdapServer.java` LDAP test library class. > It will allow LDAP tests to customize the handling of server-side exceptions. > > The current `BaseLdapTestServer` implementation prints an exception and its > stack trace to the standard error stream. > > Existing tests in `test/jdk/com/sun/jndi/ldap` that use the modified library > class are passing with the modified version. > Hello Aleksei, the change looks fine to me. > > The new method name handleSocketException could be a bit confusing since it > might indicate this is about handling java.net.SocketException. But I think, > given that this is just a test library code and that the method has a comment > explaining when it's called, I think it's OK. > Like Jaikiran I don't like the name of the new method much - but anything I > could come up with was not much better. Hi Jaikiran, Daniel, Vyom, Thanks for your reviews. I can see how the method name can be confusing, but I will stick with `handleSocketException` given that it: a) has a comment describing its use cases; b) takes two parameters that give a clue on intended usage; c) has no better alternative; d) is a test library method and we can change it later if better alternative is found. ------------- PR: https://git.openjdk.org/jdk/pull/12347