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

German Parente
05.48.2012 b09d6f4373018350f5b8bb1f8952995c5ba01fce
Fix for issue OPENDJ-327: NPE in access log on clicking "Do not Accept" certificate in Control Panel
1 files modified
17 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/browser/NodeRefresher.java 17 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/browser/NodeRefresher.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2012 ForgeRock AS
 */
package org.opends.guitools.controlpanel.browser;
@@ -277,6 +278,7 @@
        changeStateTo(State.READING_LOCAL_ENTRY);
        runReadLocalEntry();
      }
      if (!isInFinalState()) {
      if (controller.getFollowReferrals() && isReferralEntry(localEntry)) {
        changeStateTo(State.SOLVING_REFERRAL);
        runSolveReferral();
@@ -306,6 +308,7 @@
        });
      }
    }
    }
    catch (NamingException ne)
    {
      exception = ne;
@@ -331,7 +334,11 @@
   */
  private boolean useCustomFilter()
  {
    return !controller.getFilter().equals(BrowserController.ALL_OBJECTS_FILTER);
    boolean result=false;
    if (controller.getFilter()!=null)
      result =
        !controller.getFilter().equals(BrowserController.ALL_OBJECTS_FILTER);
    return result;
  }
  /**
@@ -424,10 +431,10 @@
  private void runReadLocalEntry() throws SearchAbandonException {
    BasicNode node = getNode();
    InitialLdapContext ctx = null;
    try {
      ctx = controller.findConnectionForLocalEntry(node);
      if (ctx != null) {
      if (useCustomFilter())
      {
        // Check that the entry verifies the filter
@@ -438,7 +445,8 @@
      ctls.setReturningAttributes(controller.getAttrsForRedSearch());
      ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
      NamingEnumeration<SearchResult> s = ctx.search(new LdapName(node.getDN()),
        NamingEnumeration<SearchResult> s =
                ctx.search(new LdapName(node.getDN()),
                controller.getObjectSearchFilter(),
                ctls);
      try
@@ -460,6 +468,9 @@
        throw new NameNotFoundException("Can't find entry: "+node.getDN());
      }
      throwAbandonIfNeeded(null);
      } else {
          changeStateTo(State.FINISHED);
      }
    }
    catch(NamingException x) {
      throwAbandonIfNeeded(x);