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

matthew_swift
03.22.2007 e0705de19ed49e8f372bcc11923066f763a2d971
Override property string encoder to use InetAddress.getHostName() rather than the default toString() implementation. The latter format is not parsable by the InetAddress constructor.
1 files modified
11 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/admin/IPAddressPropertyDefinition.java 11 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/admin/IPAddressPropertyDefinition.java
@@ -143,6 +143,17 @@
   * {@inheritDoc}
   */
  @Override
  public String encodeValue(InetAddress value)
      throws IllegalPropertyValueException {
    return value.getHostName();
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
    return v.visitIPAddress(this, p);
  }