From e1ea3e0d8999105f144d2be98e0286928b8319ed Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 03 Apr 2007 18:52:11 +0000
Subject: [PATCH] Add initial support for a virtual attribute subsystem, and implement a few different kinds of virtual attributes.  This commit addresses the following issues:

---
 opends/src/server/org/opends/server/backends/task/TaskBackend.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/task/TaskBackend.java b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
index e6e42ca..aa3ba12 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskBackend.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -84,9 +84,6 @@
        extends Backend
        implements ConfigurableComponent
 {
-
-
-
   /**
    * The set of time units that will be used for expressing the task retention
    * time.
@@ -157,8 +154,6 @@
   {
     super();
 
-
-
     // Perform all initialization in initializeBackend.
   }
 
@@ -586,8 +581,10 @@
   public void addEntry(Entry entry, AddOperation addOperation)
          throws DirectoryException
   {
+    Entry e = entry.duplicate(false);
+
     // Get the DN for the entry and then get its parent.
-    DN entryDN = entry.getDN();
+    DN entryDN = e.getDN();
     DN parentDN = entryDN.getParentDNInSuffix();
 
     if (parentDN == null)
@@ -603,7 +600,7 @@
     // treat the provided entry like a scheduled task.
     if (parentDN.equals(scheduledTaskParentDN))
     {
-      Task task = taskScheduler.entryToScheduledTask(entry, addOperation);
+      Task task = taskScheduler.entryToScheduledTask(e, addOperation);
       taskScheduler.scheduleTask(task, true);
       return;
     }
@@ -612,7 +609,7 @@
     // treat the provided entry like a recurring task.
     if (parentDN.equals(recurringTaskParentDN))
     {
-      RecurringTask recurringTask = taskScheduler.entryToRecurringTask(entry);
+      RecurringTask recurringTask = taskScheduler.entryToRecurringTask(e);
       taskScheduler.addRecurringTask(recurringTask, true);
       return;
     }

--
Gitblit v1.10.0