mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
08.12.2013 f89c99bee37103772b4009fea14387fa92f9da98
refs
author Nicolas Capponi <nicolas.capponi@forgerock.com>
Tuesday, October 8, 2013 18:12 +0200
committer Nicolas Capponi <nicolas.capponi@forgerock.com>
Tuesday, October 8, 2013 18:12 +0200
commitf89c99bee37103772b4009fea14387fa92f9da98
tree 219f1133fec56beb0327e4dc194efea6d47eda2d tree | zip | gz
parent 3c062316441f2adb96afb6a6a98c09d91c27bd97 view | diff
OPENDJ-346 Consider using java.util.ServiceLoader for loading extensions and requesting transport implementations

Fixed an issue in StaticUtils#getProvider : passing a null class loader to ServiceLoader#load(Class<T>, ClassLoader) has unexpected effect,
ie it is not throwing a NPE and has not the same behavior that ServiceLoader#load(Class<T>).

Now code explicitely checks for null class loader and use the appropriate load method.

As a consequence :
* Reverted in all tests of opendj-ldap-sdk the use of a specific LDAPOption to provide a specific class loader, as it is not necessary any more with the fix.
* Removed utility methods in TestCaseUtils class to ease the use of custom class loader, they're not needed anymore
7 files modified
242 ■■■■■ changed files
opendj3/opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/StaticUtils.java 16 ●●●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/com/forgerock/opendj/ldap/GrizzlyLDAPConnectionTestCase.java 6 ●●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/ConnectionFactoryTestCase.java 63 ●●●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/LDAPConnectionFactoryTestCase.java 43 ●●●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/LDAPListenerTestCase.java 90 ●●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/LDAPServer.java 2 ●●● diff | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java 22 ●●●●● diff | view | raw | blame | history