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

boli
22.47.2007 9a72955d0b08a0a1b3116d9eaba993c77c84d8c1
opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -412,7 +412,7 @@
  public ConditionResult hasSubordinates(DN entryDN)
         throws DirectoryException
  {
    long ret = numSubordinates(entryDN);
    long ret = numSubordinates(entryDN, false);
    if(ret < 0)
    {
      return ConditionResult.UNDEFINED;
@@ -433,7 +433,8 @@
   * {@inheritDoc}
   */
  @Override()
  public long numSubordinates(DN entryDN) throws DirectoryException
  public long numSubordinates(DN entryDN, boolean subtree)
      throws DirectoryException
  {
    if (entryDN == null)
    {
@@ -443,7 +444,15 @@
    if (entryDN.equals(taskRootDN))
    {
      // scheduled and recurring parents.
      return 2;
      if(!subtree)
      {
        return 2;
      }
      else
      {
        return taskScheduler.getScheduledTaskCount() +
            taskScheduler.getRecurringTaskCount() + 2;
      }
    }
    else if (entryDN.equals(scheduledTaskParentDN))
    {