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

matthew_swift
19.53.2010 df76b20724fad58717bcf7d2ea3897743b7ed113
toString() should never return null
2 files modified
12 ■■■■■ changed files
opends/src/messages/messages/core.properties 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/ResultCode.java 8 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/core.properties
@@ -20,7 +20,7 @@
#
# CDDL HEADER END
#
#      Copyright 2006-2009 Sun Microsystems, Inc.
#      Copyright 2006-2010 Sun Microsystems, Inc.
@@ -1828,3 +1828,5 @@
SEVERE_WARN_SUBENTRY_FILTER_NOT_INDEXED_724=The search filter "%s" used by \
 subentry manager is not indexed in backend %s.  Backend initialization \
 for subentry manager processing might take a very long time to complete
INFO_RESULT_UNDEFINED_725=Undefined
opends/src/server/org/opends/server/types/ResultCode.java
@@ -22,13 +22,14 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.types;
import org.opends.messages.Message;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.util.Validator;
import static org.opends.messages.CoreMessages.*;
@@ -50,7 +51,7 @@
   * The result code that should only be used if the actual result
   * code has not yet been determined.
   */
  UNDEFINED(-1, null),
  UNDEFINED(-1, INFO_RESULT_UNDEFINED.get()),
@@ -705,6 +706,7 @@
   */
  private ResultCode(int intValue, Message name)
  {
    Validator.ensureNotNull(name);
    this.intValue       = intValue;
    this.resultCodeName = name;
  }
@@ -895,7 +897,7 @@
   */
  public String toString()
  {
    return resultCodeName != null ? resultCodeName.toString() : null;
    return resultCodeName.toString();
  }
}