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

Matthew Swift
28.22.2012 6353689bd52dcc1dcda557af7de27e6583af027c
Fix OPENDJ-427: AuthenticatedConnectionFactory hides exception with NPE
2 files modified
13 ■■■■ changed files
opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AuthenticatedConnectionFactory.java 7 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj3/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/AuthenticatedConnectionFactory.java
@@ -147,8 +147,11 @@
            final ErrorResultException errorResult)
        {
          // Ensure that the connection is closed.
          connection.close();
          connection = null;
          if (connection != null)
          {
            connection.close();
            connection = null;
          }
          return errorResult;
        }
opendj-sdk/opendj3/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java
@@ -236,15 +236,11 @@
            final ErrorResultException errorResult)
        {
          // Ensure that the connection is closed.
          try
          if (connection != null)
          {
            connection.close();
            connection = null;
          }
          catch (final Exception e)
          {
            // Ignore.
          }
          return errorResult;
        }