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

Jean-Noël Rouvignac
04.15.2016 9d0cd2315ad10d4afce13c8865bd2e16a68b2b71
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LDIFViewEntryPanel.java
@@ -36,10 +36,9 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.Attribute;
import org.forgerock.opendj.ldap.ByteString;
import org.opends.guitools.controlpanel.datamodel.CustomSearchResult;
import org.forgerock.opendj.ldap.Entry;
import org.opends.guitools.controlpanel.task.OfflineUpdateException;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.server.types.Entry;
import org.opends.server.types.LDIFImportConfig;
import org.opends.server.types.OpenDsException;
import org.opends.server.util.Base64;
@@ -76,7 +75,7 @@
  private JScrollPane readOnlyScroll;
  private JTextArea editableAttributes;
  private JTextArea readOnlyAttributes;
  private CustomSearchResult searchResult;
  private Entry searchResult;
  /** Default constructor. */
  public LDIFViewEntryPanel()
@@ -151,7 +150,7 @@
  }
  @Override
  public void update(CustomSearchResult sr, boolean isReadOnly, TreePath path)
  public void update(Entry sr, boolean isReadOnly, TreePath path)
  {
    boolean sameEntry = false;
    if (searchResult != null && sr != null)
@@ -261,16 +260,13 @@
  }
  @Override
  public Entry getEntry() throws OpenDsException
  public org.opends.server.types.Entry getEntry() throws OpenDsException
  {
    LDIFImportConfig ldifImportConfig = null;
    try
    String ldif = getLDIF();
    try (LDIFImportConfig ldifImportConfig = new LDIFImportConfig(new StringReader(ldif));
        LDIFReader reader = new LDIFReader(ldifImportConfig))
    {
      String ldif = getLDIF();
      ldifImportConfig = new LDIFImportConfig(new StringReader(ldif));
      LDIFReader reader = new LDIFReader(ldifImportConfig);
      Entry entry = reader.readEntry(checkSchema());
      org.opends.server.types.Entry entry = reader.readEntry(checkSchema());
      addValuesInRDN(entry);
      return entry;
    }
@@ -279,13 +275,6 @@
      throw new OfflineUpdateException(
          ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe), ioe);
    }
    finally
    {
      if (ldifImportConfig != null)
      {
        ldifImportConfig.close();
      }
    }
  }
  /**