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

jvergara
19.38.2009 abcb169a28a9c3dab2975fb3417327840163bf61
In some cases it appears that interrupting the thread that is executing a search does not throw a NamingInterruptedException but a CommunicationException generated by an InterruptedIOException.  The following modifications fix this.
2 files modified
22 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/browser/NodeRefresher.java 6 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java 16 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/browser/NodeRefresher.java
@@ -500,14 +500,14 @@
        }
        throwAbandonIfNeeded(null);
      }
      catch(InterruptedNamingException x) {
      catch (InterruptedNamingException x) {
        throwAbandonIfNeeded(x);
      }
      catch(NamingException x) {
      catch (NamingException x) {
        lastException = x;
        lastExceptionArg = referral[i];
      }
      catch(DirectoryException de) {
      catch (DirectoryException de) {
        lastException = de;
        lastExceptionArg = referral[i];
      }
opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
@@ -532,7 +532,7 @@
      }
      catch (Throwable t)
      {
        if (!(t instanceof InterruptedNamingException))
        if (!isInterruptedException(t))
        {
          EntryReadErrorEvent ev = new EntryReadErrorEvent(this, dn, t);
          entryPane.entryReadError(ev);
@@ -1477,4 +1477,18 @@
      return menu;
    }
  }
  private boolean isInterruptedException(Throwable t)
  {
    boolean isInterruptedException = false;
    isInterruptedException = t instanceof java.io.InterruptedIOException ||
    t instanceof InterruptedNamingException;
    while ((t != null) && !isInterruptedException)
    {
      t = t.getCause();
      isInterruptedException = t instanceof java.io.InterruptedIOException ||
      t instanceof InterruptedNamingException;
    }
    return isInterruptedException;
  }
}