From 491d49aa75d97f97a1ef4718dfc768de76ad963b Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 22 Dec 2014 14:11:13 +0000
Subject: [PATCH] OPENDJ-1707 Persistit: various import problems Code review: Matthew Swift
---
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java
index 94ff788..70ba832 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java
@@ -27,6 +27,13 @@
*/
package org.opends.server.backends.pluggable;
+import static org.opends.messages.JebMessages.*;
+import static org.opends.server.backends.pluggable.JebFormat.*;
+import static org.opends.server.core.DirectoryServer.*;
+import static org.opends.server.protocols.ldap.LDAPResultCode.*;
+import static org.opends.server.types.AdditionalLogItem.*;
+import static org.opends.server.util.StaticUtils.*;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -96,13 +103,6 @@
import org.opends.server.util.ServerConstants;
import org.opends.server.util.StaticUtils;
-import static org.opends.messages.JebMessages.*;
-import static org.opends.server.backends.pluggable.JebFormat.*;
-import static org.opends.server.core.DirectoryServer.*;
-import static org.opends.server.protocols.ldap.LDAPResultCode.*;
-import static org.opends.server.types.AdditionalLogItem.*;
-import static org.opends.server.util.StaticUtils.*;
-
/**
* Storage container for LDAP entries. Each base DN of a JE backend is given
* its own entry container. The entry container is the object that implements
@@ -1669,7 +1669,7 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ throwAllowedExceptionTypes(e, DirectoryException.class, CanceledOperationException.class);
}
}
@@ -1848,7 +1848,7 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ throwAllowedExceptionTypes(e, DirectoryException.class, CanceledOperationException.class);
}
}
@@ -2021,9 +2021,10 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ // it is not very clean to specify twice the same exception but it saves me some code for now
+ throwAllowedExceptionTypes(e, DirectoryException.class, DirectoryException.class);
+ return null; // it can never happen
}
-
}
private Entry getEntry0(ReadableStorage txn, final DN entryDN) throws StorageRuntimeException, DirectoryException
@@ -2070,7 +2071,8 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ // it is not very clean to specify twice the same exception but it saves me some code for now
+ throwAllowedExceptionTypes(e, DirectoryException.class, DirectoryException.class);
}
}
@@ -2193,7 +2195,7 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ throwAllowedExceptionTypes(e, DirectoryException.class, CanceledOperationException.class);
}
}
@@ -2445,7 +2447,7 @@
}
catch (Exception e)
{
- throw new StorageRuntimeException(e);
+ throwAllowedExceptionTypes(e, DirectoryException.class, CanceledOperationException.class);
}
}
--
Gitblit v1.10.0