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

jcduff
23.04.2008 f73b655466092169abac34833fb628fce1fcdebe
opends/src/server/org/opends/server/backends/jeb/DN2URI.java
@@ -106,6 +106,7 @@
   * @param entryContainer The entryContainer of the DN database.
   * @throws DatabaseException If an error occurs in the JE database.
   */
  @SuppressWarnings("unchecked")
  DN2URI(String name, Environment env,
        EntryContainer entryContainer)
      throws DatabaseException
@@ -136,7 +137,10 @@
      dn2uriConfig.setTransactional(true);
    }
    this.dbConfig = dn2uriConfig;
    this.dbConfig.setBtreeComparator(dn2uriComparator.getClass());
    //This line causes an unchecked cast error if the SuppressWarnings
    //annotation is removed at the beginning of this method.
    this.dbConfig.setBtreeComparator((Class<? extends Comparator<byte[]>>)
                                  dn2uriComparator.getClass());
  }
  /**
@@ -309,7 +313,7 @@
          case ADD:
            if (a != null)
            {
              for (AttributeValue v : a.getValues())
              for (AttributeValue v : a)
              {
                insert(txn, entryDN, v.getStringValue());
              }
@@ -317,13 +321,13 @@
            break;
          case DELETE:
            if (a == null || !a.hasValue())
            if (a == null || a.isEmpty())
            {
              delete(txn, entryDN);
            }
            else
            {
              for (AttributeValue v : a.getValues())
              for (AttributeValue v : a)
              {
                delete(txn, entryDN, v.getStringValue());
              }
@@ -338,7 +342,7 @@
            delete(txn, entryDN);
            if (a != null)
            {
              for (AttributeValue v : a.getValues())
              for (AttributeValue v : a)
              {
                insert(txn, entryDN, v.getStringValue());
              }