From 6b2141405094a1bbe9c133092244bf6f54a30b72 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 16 Apr 2013 08:46:37 +0000
Subject: [PATCH] (Matthew Swift reviewed) Code cleanup.

---
 opends/src/server/org/opends/server/core/OperationWrapper.java |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/OperationWrapper.java b/opends/src/server/org/opends/server/core/OperationWrapper.java
index 429679d..0e21cff 100644
--- a/opends/src/server/org/opends/server/core/OperationWrapper.java
+++ b/opends/src/server/org/opends/server/core/OperationWrapper.java
@@ -38,13 +38,16 @@
 
 
 /**
- * This abstract class is a generic operation wrapper intended to be
- * subclassed by a specific operation wrapper.
+ * This abstract class is a generic operation wrapper intended to be subclassed
+ * by a specific operation wrapper.
+ *
+ * @param <W>
+ *          the type of the object wrapped by this class
  */
-public class OperationWrapper implements Operation
+public class OperationWrapper<W extends Operation> implements Operation
 {
   /** The wrapped operation. */
-  private Operation operation;
+  private W operation;
 
 
   /**
@@ -52,7 +55,7 @@
    *
    * @param operation  the generic operation to wrap
    */
-  public OperationWrapper(Operation operation)
+  public OperationWrapper(W operation)
   {
     this.operation = operation;
   }
@@ -234,6 +237,16 @@
   }
 
   /**
+   * Returns the wrapped {@link Operation}.
+   *
+   * @return the wrapped {@link Operation}.
+   */
+  protected W getOperation()
+  {
+    return operation;
+  }
+
+  /**
    * {@inheritDoc}
    */
   @Override

--
Gitblit v1.10.0