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

vharseko
21.47.2019 57a6140a1990ecd8e0dad51985eba78d33ea0fa7
FIX https://github.com/OpenIdentityPlatform/OpenDJ/issues/65 thanks
@winklerd
1 files modified
15 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SimplifiedViewEntryPanel.java 15 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SimplifiedViewEntryPanel.java
@@ -39,6 +39,7 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.StringReader;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -924,7 +925,6 @@
    hmEditors.put(attrName.toLowerCase(), components);
    final Schema schema = getInfo().getServerDescriptor().getSchema();
    boolean isBinary = isBinary(attrName);
    for (ByteString v : values)
    {
      gbc.fill = GridBagConstraints.HORIZONTAL;
@@ -981,17 +981,17 @@
        components.add(new EditorComponent(ocCellPanel));
        break;
      }
      else if (isPassword(attrName) || isConfirmPassword(attrName))
      else if (isConfirmPassword(attrName) || isPassword(attrName))
      {
        JPasswordField pf = Utilities.createPasswordField();
        if (!"".equals(v))
        {
          pf.setText(getPasswordStringValue(attrName, v));
          pf.setText(getPasswordStringValue(getAttributeForConfirmPasswordKey(attrName), v));
        }
        panel.add(pf, gbc);
        components.add(new EditorComponent(pf));
      }
      else if (!isBinary)
      else if (!isBinary(attrName))
      {
        if (isSingleValue(attrName))
        {
@@ -1215,7 +1215,7 @@
    }
    final String ldif = getLDIF();
    try (LDIFEntryReader reader = new LDIFEntryReader(ldif)
    try (LDIFEntryReader reader = new LDIFEntryReader(new StringReader(ldif))
        .setSchemaValidationPolicy(checkSchema() ? defaultPolicy():ignoreAll()))
    {
      final Entry entry = reader.readEntry();
@@ -1286,6 +1286,11 @@
    return key.startsWith(CONFIRM_PASSWORD);
  }
    private String getAttributeForConfirmPasswordKey(String key)
    {
        return key.startsWith(CONFIRM_PASSWORD) ? key.substring(CONFIRM_PASSWORD.length()) : key;
    }
  /**
   * Returns the LDIF representation of the displayed entry.
   * @return the LDIF representation of the displayed entry.