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

Nicolas Capponi
08.33.2014 8643a9160860e31611f034467f702eb3a712eb34
Replace org.opends.server.util.Validator class by 
org.forgerock.util.Reject class from forgerock-util module

2 files deleted
90 files modified
1351 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/admin/ACIPropertyDefinition.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/AggregationPropertyDefinition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/AttributeTypePropertyDefinition.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/BooleanPropertyDefinition.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/ClassLoaderProvider.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/ClassPropertyDefinition.java 14 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/DNPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.java 13 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/EnumPropertyDefinition.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/IPAddressMaskPropertyDefinition.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/IPAddressPropertyDefinition.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/InstantiableRelationDefinition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java 19 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/RelationDefinition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/SizePropertyDefinition.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/StringPropertyDefinition.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/Tag.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/client/ManagedObjectDecodingException.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/client/MissingMandatoryPropertiesException.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/client/OperationRejectedException.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/client/ldap/LDAPManagementContext.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/condition/ANDCondition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/condition/ContainsCondition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/condition/IsPresentCondition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/condition/NOTCondition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/condition/ORCondition.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/server/ConstraintViolationException.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/server/ServerManagedObjectDecodingException.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/PatternDN.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/BackupBackend.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/LDIFBackend.java 3 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/MemoryBackend.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/MonitorBackend.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/NullBackend.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/RootDSEBackend.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/SchemaBackend.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/TrustStoreBackend.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/BackendImpl.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/DataConfig.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskBackend.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java 32 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/controls/ProxiedAuthV2Control.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/core/BaseDnRegistry.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java 41 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/crypto/CryptoManagerImpl.java 36 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/extensions/DynamicGroup.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/extensions/StaticGroup.java 16 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/extensions/VirtualStaticGroup.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java 3 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/schema/StringPrepProfile.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/AbstractOperation.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/AdditionalLogItem.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/AttributeBuilder.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/AuthenticationInfo.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/CommonSchemaElements.java 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/DITContentRule.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/DITStructureRule.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/DN.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/LDAPSyntaxDescription.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/MatchingRuleUse.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/NameForm.java 10 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/ObjectClass.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/RawAttribute.java 14 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/ResultCode.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/VirtualAttributeRule.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/AddChangeRecordEntry.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/Base64.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/ChangeRecordEntry.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java 24 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/LevenshteinDistance.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/ModifyChangeRecordEntry.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/MultiOutputStream.java 5 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/StaticUtils.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/util/Validator.java 473 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/BooleanPropertyDefinitionTest.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/EnumPropertyDefinitionTest.java 3 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java 7 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/ProxiedAuthV2ControlTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidatorTestCase.java 2 ●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/LevenshteinDistanceTestCase.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/ValidatorTests.java 168 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/admin/ACIPropertyDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -30,7 +31,7 @@
import org.opends.server.authorization.dseecompat.AciException;
import org.opends.server.types.DN;
import org.opends.server.types.ByteString;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
@@ -101,7 +102,7 @@
  @Override
  public void validateValue(Aci value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No additional validation required.
  }
@@ -112,7 +113,7 @@
  @Override
  public Aci decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      return Aci.decode(ByteString.valueOf(value), DN.NULL_DN);
opendj3-server-dev/src/server/org/opends/server/admin/AggregationPropertyDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2007-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.messages.AdminMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.Collection;
import java.util.Collections;
@@ -945,7 +946,7 @@
  @Override
  public String decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      validateValue(value);
opendj3-server-dev/src/server/org/opends/server/admin/AttributeTypePropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
@@ -174,7 +175,7 @@
  @Override
  public AttributeType decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    String name = value.trim().toLowerCase();
    AttributeType type = DirectoryServer.getAttributeType(name,
@@ -211,7 +212,7 @@
  @Override
  public void validateValue(AttributeType value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No implementation required.
  }
opendj3-server-dev/src/server/org/opends/server/admin/BooleanPropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
import java.util.HashMap;
@@ -124,7 +125,7 @@
  @Override
  public void validateValue(Boolean value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No additional validation required.
  }
@@ -137,7 +138,7 @@
  @Override
  public Boolean decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    String nvalue = value.trim().toLowerCase();
    Boolean b = VALUE_MAP.get(nvalue);
opendj3-server-dev/src/server/org/opends/server/admin/ClassLoaderProvider.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Portions copyright 2012 ForgeRock AS.
 *      Portions Copyright 2012-2014 ForgeRock AS.
 */
package org.opends.server.admin;
@@ -63,7 +63,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.InitializationException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -215,7 +215,7 @@
  public synchronized void addExtension(String... extensions)
      throws InitializationException, IllegalStateException,
      IllegalArgumentException {
    Validator.ensureNotNull(extensions);
    Reject.ifNull(extensions);
    if (loader == null) {
      throw new IllegalStateException(
opendj3-server-dev/src/server/org/opends/server/admin/ClassPropertyDefinition.java
@@ -22,14 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.Collections;
import java.util.EnumSet;
@@ -84,7 +84,7 @@
     *          implement.
     */
    public final void addInstanceOf(String className) {
      ensureNotNull(className);
      ifNull(className);
      /*
       * Do some basic checks to make sure the string representation is valid.
@@ -245,7 +245,7 @@
  @Override
  public String decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      validateValue(value);
@@ -293,7 +293,7 @@
  public <T> Class<? extends T> loadClass(String className,
      Class<T> instanceOf) throws IllegalPropertyValueException,
      ClassCastException {
    ensureNotNull(className, instanceOf);
    ifNull(className, instanceOf);
    // Make sure that the named class is valid.
    validateClassName(className);
@@ -311,7 +311,7 @@
  @Override
  public String normalizeValue(String value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    return value.trim();
  }
@@ -324,7 +324,7 @@
  @Override
  public void validateValue(String value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // Always make sure the name is a valid class name.
    validateClassName(value);
opendj3-server-dev/src/server/org/opends/server/admin/DNPropertyDefinition.java
@@ -29,7 +29,7 @@
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
@@ -172,7 +172,7 @@
  @Override
  public void validateValue(DN value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    if (baseDN != null) {
      DN parent = value.parent();
@@ -195,7 +195,7 @@
  @Override
  public DN decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      DN dn = DN.valueOf(value);
opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.EnumSet;
@@ -135,7 +136,7 @@
     *           than the maximum unit.
     */
    public final void setBaseUnit(String unit) throws IllegalArgumentException {
      ensureNotNull(unit);
      ifNull(unit);
      setBaseUnit(DurationUnit.getUnit(unit));
    }
@@ -155,7 +156,7 @@
     */
    public final void setBaseUnit(DurationUnit unit)
        throws IllegalArgumentException {
      ensureNotNull(unit);
      ifNull(unit);
      // Make sure that the base unit is not bigger than the maximum
      // unit.
@@ -462,7 +463,7 @@
   */
  @Override
  public void validateValue(Long value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    long nvalue = baseUnit.toMilliSeconds(value);
    if (!allowUnlimited && nvalue < lowerLimit) {
@@ -485,7 +486,7 @@
   */
  @Override
  public String encodeValue(Long value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // Make sure that we correctly encode negative values as
    // "unlimited".
@@ -511,7 +512,7 @@
  @Override
  public Long decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    // First check for the special "unlimited" value when necessary.
    if (allowUnlimited) {
opendj3-server-dev/src/server/org/opends/server/admin/EnumPropertyDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
import java.util.HashMap;
@@ -179,7 +180,7 @@
  @Override
  public E decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    String nvalue = value.trim().toLowerCase();
    E eValue = decodeMap.get(nvalue);
@@ -254,7 +255,7 @@
  @Override
  public String normalizeValue(E value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    return value.toString().trim().toLowerCase();
  }
@@ -267,7 +268,7 @@
  @Override
  public void validateValue(E value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No additional validation required.
  }
opendj3-server-dev/src/server/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
@@ -110,7 +111,7 @@
  @Override
  public void validateValue(AddressMask value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No additional validation required.
  }
@@ -123,7 +124,7 @@
  @Override
  public AddressMask decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      return AddressMask.decode(value);
opendj3-server-dev/src/server/org/opends/server/admin/IPAddressPropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.net.InetAddress;
import java.net.UnknownHostException;
@@ -109,7 +110,7 @@
  @Override
  public void validateValue(InetAddress value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // No additional validation required.
  }
@@ -122,7 +123,7 @@
  @Override
  public InetAddress decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      return InetAddress.getByName(value);
opendj3-server-dev/src/server/org/opends/server/admin/InstantiableRelationDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.Collections;
import java.util.HashMap;
@@ -130,7 +131,7 @@
     */
    public void setNamingProperty(
        PropertyDefinition<?> namingPropertyDefinition) {
      ensureNotNull(namingPropertyDefinition);
      ifNull(namingPropertyDefinition);
      this.namingPropertyDefinition = namingPropertyDefinition;
    }
opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
import java.util.Locale;
@@ -276,7 +277,7 @@
  @Override
  public void validateValue(Integer value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    if (!allowUnlimited && value < lowerLimit) {
      throw new IllegalPropertyValueException(this, value);
@@ -297,7 +298,7 @@
  @Override
  public String encodeValue(Integer value)
          throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // Make sure that we correctly encode negative values as "unlimited".
    if (allowUnlimited) {
@@ -315,7 +316,7 @@
  @Override
  public Integer decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    if (allowUnlimited) {
      if (value.trim().equalsIgnoreCase(UNLIMITED)) {
opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.Comparator;
import java.util.EnumSet;
@@ -126,7 +127,7 @@
     *          The administrator action.
     */
    public final void setAdministratorAction(AdministratorAction adminAction) {
      ensureNotNull(adminAction);
      ifNull(adminAction);
      this.adminAction = adminAction;
    }
@@ -140,7 +141,7 @@
     */
    public final void setDefaultBehaviorProvider(
        DefaultBehaviorProvider<T> defaultBehavior) {
      ensureNotNull(defaultBehavior);
      ifNull(defaultBehavior);
      this.defaultBehavior = defaultBehavior;
    }
@@ -153,7 +154,7 @@
     *          The property option.
     */
    public final void setOption(PropertyOption option) {
      ensureNotNull(option);
      ifNull(option);
      options.add(option);
    }
@@ -223,8 +224,8 @@
      Class<T> theClass, String propertyName, EnumSet<PropertyOption> options,
      AdministratorAction adminAction,
      DefaultBehaviorProvider<T> defaultBehavior) {
    ensureNotNull(d, theClass, propertyName);
    ensureNotNull(options, adminAction, defaultBehavior);
    ifNull(d, theClass, propertyName);
    ifNull(options, adminAction, defaultBehavior);
    this.definition = d;
    this.theClass = theClass;
@@ -323,7 +324,7 @@
   *         the second.
   */
  public int compare(T o1, T o2) {
    ensureNotNull(o1, o2);
    ifNull(o1, o2);
    String s1 = normalizeValue(o1);
    String s2 = normalizeValue(o2);
@@ -386,7 +387,7 @@
   *           If the property value is invalid.
   */
  public String encodeValue(T value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    return value.toString();
  }
@@ -605,7 +606,7 @@
   *           If the property value is invalid.
   */
  public String normalizeValue(T value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    return encodeValue(value);
  }
opendj3-server-dev/src/server/org/opends/server/admin/RelationDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.EnumSet;
import java.util.Locale;
@@ -145,7 +146,7 @@
     *          The relation option.
     */
    public final void setOption(RelationOption option) {
      ensureNotNull(option);
      ifNull(option);
      common.options.add(option);
    }
opendj3-server-dev/src/server/org/opends/server/admin/SizePropertyDefinition.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
@@ -278,7 +279,7 @@
   */
  @Override
  public void validateValue(Long value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    if (!allowUnlimited && value < lowerLimit) {
      throw new IllegalPropertyValueException(this, value);
@@ -300,7 +301,7 @@
   */
  @Override
  public String encodeValue(Long value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    // Make sure that we correctly encode negative values as "unlimited".
    if (allowUnlimited) {
@@ -329,7 +330,7 @@
  @Override
  public Long decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    // First check for the special "unlimited" value when necessary.
    if (allowUnlimited) {
opendj3-server-dev/src/server/org/opends/server/admin/StringPropertyDefinition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -29,7 +30,7 @@
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
import java.util.Locale;
@@ -203,7 +204,7 @@
  @Override
  public String decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    ifNull(value);
    try {
      validateValue(value);
@@ -306,7 +307,7 @@
  @Override
  public String normalizeValue(String value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    if (isCaseInsensitive()) {
      return value.trim().toLowerCase();
@@ -322,7 +323,7 @@
   */
  @Override
  public void validateValue(String value) throws IllegalPropertyValueException {
    ensureNotNull(value);
    ifNull(value);
    if (pattern != null) {
      Matcher matcher = pattern.matcher(value);
opendj3-server-dev/src/server/org/opends/server/admin/Tag.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
import org.opends.messages.Message;
@@ -36,7 +37,7 @@
import java.util.MissingResourceException;
import org.opends.server.admin.std.meta.RootCfgDefn;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -78,7 +79,7 @@
   *           If the tag name was not recognized.
   */
  public static Tag valueOf(String name) throws IllegalArgumentException {
    Validator.ensureNotNull(name);
    Reject.ifNull(name);
    // Hack to force initialization of the tag definitions.
    RootCfgDefn.getInstance();
opendj3-server-dev/src/server/org/opends/server/admin/client/ManagedObjectDecodingException.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client;
@@ -40,7 +41,7 @@
import org.opends.server.admin.DecodingException;
import org.opends.server.admin.ManagedObjectDefinition;
import org.opends.server.admin.PropertyException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -60,8 +61,8 @@
  // Create the message.
  private static Message createMessage(ManagedObject<?> partialManagedObject,
      Collection<PropertyException> causes) {
    Validator.ensureNotNull(causes);
    Validator.ensureTrue(!causes.isEmpty());
    Reject.ifNull(causes);
    Reject.ifFalse(!causes.isEmpty());
    ManagedObjectDefinition<?, ?> d = partialManagedObject
        .getManagedObjectDefinition();
opendj3-server-dev/src/server/org/opends/server/admin/client/MissingMandatoryPropertiesException.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client;
@@ -38,7 +39,7 @@
import org.opends.messages.MessageBuilder;
import org.opends.server.admin.OperationsException;
import org.opends.server.admin.PropertyIsMandatoryException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -59,8 +60,8 @@
  // Create the message.
  private static Message createMessage(
      Collection<PropertyIsMandatoryException> causes) {
    Validator.ensureNotNull(causes);
    Validator.ensureTrue(!causes.isEmpty());
    Reject.ifNull(causes);
    Reject.ifFalse(!causes.isEmpty());
    if (causes.size() == 1) {
      return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_SINGLE.get(causes
opendj3-server-dev/src/server/org/opends/server/admin/client/OperationRejectedException.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client;
@@ -36,7 +37,7 @@
import org.opends.messages.Message;
import org.opends.messages.MessageBuilder;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -84,8 +85,8 @@
  // Gets the default message.
  private static Message getDefaultMessage(Collection<Message> messages) {
    Validator.ensureNotNull(messages);
    Validator.ensureTrue(!messages.isEmpty());
    Reject.ifNull(messages);
    Reject.ifFalse(!messages.isEmpty());
    if (messages.size() == 1) {
      return ERR_OPERATION_REJECTED_EXCEPTION_SINGLE.get(messages.iterator()
opendj3-server-dev/src/server/org/opends/server/admin/client/ldap/LDAPManagementContext.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client.ldap;
@@ -31,7 +32,7 @@
import org.opends.server.admin.LDAPProfile;
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.client.spi.Driver;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -49,7 +50,7 @@
   * @return Returns the new management context.
   */
  public static ManagementContext createFromContext(LDAPConnection connection) {
    Validator.ensureNotNull(connection);
    Reject.ifNull(connection);
    return new LDAPManagementContext(connection, LDAPProfile.getInstance());
  }
opendj3-server-dev/src/server/org/opends/server/admin/condition/ANDCondition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.condition;
@@ -37,7 +38,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -61,7 +62,7 @@
   *          logical AND.
   */
  public ANDCondition(Condition... conditions) {
    Validator.ensureNotNull(conditions);
    Reject.ifNull(conditions);
    this.conditions = Arrays.asList(conditions);
  }
opendj3-server-dev/src/server/org/opends/server/admin/condition/ContainsCondition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.condition;
@@ -38,7 +39,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -134,7 +135,7 @@
   *          value.
   */
  public ContainsCondition(String propertyName, String stringValue) {
    Validator.ensureNotNull(propertyName, stringValue);
    Reject.ifNull(propertyName, stringValue);
    this.propertyName = propertyName;
    this.propertyStringValue = stringValue;
  }
opendj3-server-dev/src/server/org/opends/server/admin/condition/IsPresentCondition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.condition;
@@ -37,7 +38,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -62,7 +63,7 @@
   *          The property name.
   */
  public IsPresentCondition(String propertyName) {
    Validator.ensureNotNull(propertyName);
    Reject.ifNull(propertyName);
    this.propertyName = propertyName;
  }
opendj3-server-dev/src/server/org/opends/server/admin/condition/NOTCondition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.condition;
@@ -34,7 +35,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -58,7 +59,7 @@
   *          The sub-condition which will be inverted.
   */
  public NOTCondition(Condition condition) {
    Validator.ensureNotNull(condition);
    Reject.ifNull(condition);
    this.condition = condition;
  }
opendj3-server-dev/src/server/org/opends/server/admin/condition/ORCondition.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.condition;
@@ -37,7 +38,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -61,7 +62,7 @@
   *          logical OR.
   */
  public ORCondition(Condition... conditions) {
    Validator.ensureNotNull(conditions);
    Reject.ifNull(conditions);
    this.conditions = Arrays.asList(conditions);
  }
opendj3-server-dev/src/server/org/opends/server/admin/server/ConstraintViolationException.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.server;
@@ -37,7 +38,7 @@
import org.opends.messages.Message;
import org.opends.messages.MessageBuilder;
import org.opends.server.admin.DecodingException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -60,8 +61,8 @@
  // Gets the default message.
  private static Message getDefaultMessage(Collection<Message> messages) {
    Validator.ensureNotNull(messages);
    Validator.ensureTrue(!messages.isEmpty());
    Reject.ifNull(messages);
    Reject.ifFalse(!messages.isEmpty());
    if (messages.size() == 1) {
      return ERR_CONSTRAINT_VIOLATION_EXCEPTION_SINGLE.get(messages.iterator()
opendj3-server-dev/src/server/org/opends/server/admin/server/ServerManagedObjectDecodingException.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.server;
@@ -39,7 +40,7 @@
import org.opends.server.admin.DecodingException;
import org.opends.server.admin.ManagedObjectDefinition;
import org.opends.server.admin.PropertyException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -60,8 +61,8 @@
  private static Message createMessage(
      ServerManagedObject<?> partialManagedObject,
      Collection<PropertyException> causes) {
    Validator.ensureNotNull(causes);
    Validator.ensureTrue(!causes.isEmpty());
    Reject.ifNull(causes);
    Reject.ifFalse(!causes.isEmpty());
    ManagedObjectDefinition<?, ?> d = partialManagedObject
        .getManagedObjectDefinition();
opendj3-server-dev/src/server/org/opends/server/authorization/dseecompat/PatternDN.java
@@ -34,7 +34,7 @@
import static org.opends.server.util.StaticUtils.isDigit;
import static org.opends.server.util.StaticUtils.isHexDigit;
import static org.opends.server.util.StaticUtils.hexStringToByteArray;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
@@ -121,7 +121,7 @@
                    List<PatternRDN[]> subAnyElements,
                    PatternRDN[] subFinal)
  {
    Validator.ensureNotNull(subAnyElements);
    Reject.ifNull(subAnyElements);
    this.subInitial = subInitial;
    this.subAnyElements = subAnyElements;
    this.subFinal = subFinal;
opendj3-server-dev/src/server/org/opends/server/backends/BackupBackend.java
@@ -47,7 +47,7 @@
import org.opends.server.types.*;
import org.opends.server.schema.BooleanSyntax;
import org.opends.server.schema.GeneralizedTimeSyntax;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.config.ConfigConstants.*;
@@ -127,7 +127,7 @@
    }
    Validator.ensureTrue(config instanceof BackupBackendCfg);
    Reject.ifFalse(config instanceof BackupBackendCfg);
    currentConfig = (BackupBackendCfg)config;
  }
opendj3-server-dev/src/server/org/opends/server/backends/LDIFBackend.java
@@ -42,6 +42,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.*;
import org.opends.server.util.*;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.loggers.ErrorLogger.*;
@@ -1340,7 +1341,7 @@
  {
    if (config != null)
    {
      Validator.ensureTrue(config instanceof LDIFBackendCfg);
      Reject.ifFalse(config instanceof LDIFBackendCfg);
      currentConfig = (LDIFBackendCfg) config;
      currentConfig.addLDIFChangeListener(this);
opendj3-server-dev/src/server/org/opends/server/backends/MemoryBackend.java
@@ -68,7 +68,7 @@
import org.opends.server.util.LDIFException;
import org.opends.server.util.LDIFReader;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
@@ -168,7 +168,7 @@
  {
    if (config != null)
    {
      Validator.ensureTrue(config instanceof MemoryBackendCfg);
      Reject.ifFalse(config instanceof MemoryBackendCfg);
      MemoryBackendCfg cfg = (MemoryBackendCfg)config;
      DN[] baseDNs = new DN[cfg.getBaseDN().size()];
      cfg.getBaseDN().toArray(baseDNs);
opendj3-server-dev/src/server/org/opends/server/backends/MonitorBackend.java
@@ -53,7 +53,7 @@
import org.opends.server.util.DynamicConstants;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.TimeThread;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -193,8 +193,8 @@
  public void configureBackend(final Configuration config)
      throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof MonitorBackendCfg);
    Reject.ifNull(config);
    Reject.ifFalse(config instanceof MonitorBackendCfg);
    final MonitorBackendCfg cfg = (MonitorBackendCfg) config;
    final ConfigEntry configEntry = DirectoryServer.getConfigEntry(cfg.dn());
opendj3-server-dev/src/server/org/opends/server/backends/NullBackend.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.backends;
@@ -65,7 +66,7 @@
import org.opends.server.util.LDIFException;
import org.opends.server.util.LDIFReader;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
@@ -160,7 +161,7 @@
  {
    if (config != null)
    {
      Validator.ensureTrue(config instanceof BackendCfg);
      Reject.ifFalse(config instanceof BackendCfg);
      BackendCfg cfg = (BackendCfg)config;
      DN[] cfgBaseDNs = new DN[cfg.getBaseDN().size()];
      cfg.getBaseDN().toArray(cfgBaseDNs);
opendj3-server-dev/src/server/org/opends/server/backends/RootDSEBackend.java
@@ -62,7 +62,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.*;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.messages.ConfigMessages.
@@ -158,8 +158,8 @@
  public void configureBackend(Configuration config)
         throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof RootDSEBackendCfg);
    Reject.ifNull(config);
    Reject.ifFalse(config instanceof RootDSEBackendCfg);
    currentConfig = (RootDSEBackendCfg)config;
    configEntryDN = config.dn();
  }
opendj3-server-dev/src/server/org/opends/server/backends/SchemaBackend.java
@@ -86,7 +86,7 @@
import org.opends.server.util.LDIFException;
import org.opends.server.util.LDIFReader;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.messages.ConfigMessages.*;
@@ -274,7 +274,7 @@
      throw new ConfigException(message);
    }
    Validator.ensureTrue(config instanceof SchemaBackendCfg);
    Reject.ifFalse(config instanceof SchemaBackendCfg);
    SchemaBackendCfg cfg = (SchemaBackendCfg)config;
    ConfigEntry configEntry = DirectoryServer.getConfigEntry(cfg.dn());
opendj3-server-dev/src/server/org/opends/server/backends/TrustStoreBackend.java
@@ -78,7 +78,7 @@
import org.opends.server.types.*;
import org.opends.server.util.CertificateManager;
import org.opends.server.util.SetupUtils;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -149,8 +149,8 @@
  @Override()
  public void configureBackend(Configuration config) throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof TrustStoreBackendCfg);
    Reject.ifNull(config);
    Reject.ifFalse(config instanceof TrustStoreBackendCfg);
    configuration = (TrustStoreBackendCfg)config;
  }
opendj3-server-dev/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -54,7 +54,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.*;
import org.opends.server.util.RuntimeInformation;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Durability;
@@ -268,8 +268,8 @@
  public void configureBackend(Configuration cfg)
      throws ConfigException
  {
    Validator.ensureNotNull(cfg);
    Validator.ensureTrue(cfg instanceof LocalDBBackendCfg);
    Reject.ifNull(cfg);
    Reject.ifFalse(cfg instanceof LocalDBBackendCfg);
    this.cfg = (LocalDBBackendCfg)cfg;
opendj3-server-dev/src/server/org/opends/server/backends/jeb/DataConfig.java
@@ -22,12 +22,13 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.backends.jeb;
import org.opends.server.types.EntryEncodeConfig;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * Configuration class to indicate desired compression and cryptographic options
@@ -61,7 +62,7 @@
    if (compressedSchema == null)
    {
      ensureTrue(! compactEncoding);
      ifFalse(! compactEncoding);
      this.encodeConfig = new EntryEncodeConfig(false, compactEncoding, false);
    }
    else
@@ -115,7 +116,7 @@
  {
    if (compressedSchema == null)
    {
      ensureTrue(! compactEncoding);
      ifFalse(! compactEncoding);
      this.encodeConfig = new EntryEncodeConfig(false, compactEncoding,
                                                compactEncoding);
    }
opendj3-server-dev/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -51,6 +51,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.*;
import org.opends.server.util.*;
import org.forgerock.util.Reject;
import static org.opends.messages.BackendMessages.*;
import static org.opends.server.config.ConfigConstants.*;
@@ -140,8 +141,8 @@
  public void configureBackend(Configuration config)
         throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof TaskBackendCfg);
    Reject.ifNull(config);
    Reject.ifFalse(config instanceof TaskBackendCfg);
    TaskBackendCfg cfg = (TaskBackendCfg)config;
opendj3-server-dev/src/server/org/opends/server/controls/MatchedValuesFilter.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.controls;
import org.opends.messages.Message;
@@ -40,7 +41,7 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.*;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
@@ -226,7 +227,7 @@
                                         String rawAttributeType,
                                         ByteString rawAssertionValue)
  {
    Validator.ensureNotNull(rawAttributeType,rawAssertionValue);
    Reject.ifNull(rawAttributeType,rawAssertionValue);
    return new MatchedValuesFilter(EQUALITY_MATCH_TYPE, rawAttributeType,
                                   rawAssertionValue, null, null, null, null);
@@ -246,7 +247,7 @@
                                         AttributeType attributeType,
                                         AttributeValue assertionValue)
  {
    Validator.ensureNotNull(attributeType, assertionValue);
    Reject.ifNull(attributeType, assertionValue);
    String rawAttributeType = attributeType.getNameOrOID();
    ByteString rawAssertionValue = assertionValue.getValue();
@@ -277,7 +278,7 @@
                                         List<ByteString> subAny,
                                         ByteString subFinal)
  {
    Validator.ensureNotNull(rawAttributeType);
    Reject.ifNull(rawAttributeType);
    return new MatchedValuesFilter(SUBSTRINGS_TYPE, rawAttributeType, null,
                                   subInitial, subAny, subFinal, null);
  }
@@ -300,7 +301,7 @@
                                         List<ByteString> subAny,
                                         ByteString subFinal)
  {
    Validator.ensureNotNull(attributeType);
    Reject.ifNull(attributeType);
    String rawAttributeType = attributeType.getNameOrOID();
    MatchedValuesFilter filter =
@@ -325,7 +326,7 @@
                                         String rawAttributeType,
                                         ByteString rawAssertionValue)
  {
   Validator.ensureNotNull(rawAttributeType, rawAssertionValue);
   Reject.ifNull(rawAttributeType, rawAssertionValue);
    return new MatchedValuesFilter(GREATER_OR_EQUAL_TYPE, rawAttributeType,
                                   rawAssertionValue, null, null, null, null);
@@ -345,7 +346,7 @@
                                         AttributeType attributeType,
                                         AttributeValue assertionValue)
  {
    Validator.ensureNotNull(attributeType, assertionValue);
    Reject.ifNull(attributeType, assertionValue);
    String          rawAttributeType  = attributeType.getNameOrOID();
    ByteString rawAssertionValue = assertionValue.getValue();
@@ -373,7 +374,7 @@
                                         String rawAttributeType,
                                         ByteString rawAssertionValue)
  {
    Validator.ensureNotNull(rawAttributeType, rawAssertionValue);
    Reject.ifNull(rawAttributeType, rawAssertionValue);
    return new MatchedValuesFilter(LESS_OR_EQUAL_TYPE, rawAttributeType,
                                   rawAssertionValue, null, null, null, null);
  }
@@ -392,7 +393,7 @@
                                         AttributeType attributeType,
                                         AttributeValue assertionValue)
  {
    Validator.ensureNotNull(attributeType, assertionValue);
    Reject.ifNull(attributeType, assertionValue);
    String          rawAttributeType = attributeType.getNameOrOID();
    ByteString rawAssertionValue = assertionValue.getValue();
@@ -417,7 +418,7 @@
   */
  public static MatchedValuesFilter createPresentFilter(String rawAttributeType)
  {
    Validator.ensureNotNull(rawAttributeType) ;
    Reject.ifNull(rawAttributeType) ;
    return new MatchedValuesFilter(PRESENT_TYPE, rawAttributeType, null, null,
                                   null, null, null);
  }
@@ -434,7 +435,7 @@
  public static MatchedValuesFilter createPresentFilter(
                                         AttributeType attributeType)
  {
    Validator.ensureNotNull(attributeType);
    Reject.ifNull(attributeType);
    String rawAttributeType = attributeType.getNameOrOID();
    MatchedValuesFilter filter =
@@ -459,7 +460,7 @@
                                         String rawAttributeType,
                                         ByteString rawAssertionValue)
  {
    Validator.ensureNotNull(rawAttributeType,rawAssertionValue);
    Reject.ifNull(rawAttributeType,rawAssertionValue);
    return new MatchedValuesFilter(APPROXIMATE_MATCH_TYPE, rawAttributeType,
                                   rawAssertionValue, null, null, null, null);
@@ -479,7 +480,7 @@
                                         AttributeType attributeType,
                                         AttributeValue assertionValue)
  {
    Validator.ensureNotNull(attributeType,assertionValue);
    Reject.ifNull(attributeType,assertionValue);
    String          rawAttributeType  = attributeType.getNameOrOID();
    ByteString rawAssertionValue = assertionValue.getValue();
@@ -508,8 +509,7 @@
                                         String matchingRuleID,
                                         ByteString rawAssertionValue)
  {
    Validator
        .ensureNotNull(rawAttributeType, matchingRuleID, rawAssertionValue);
    Reject.ifNull(rawAttributeType, matchingRuleID, rawAssertionValue);
    return new MatchedValuesFilter(EXTENSIBLE_MATCH_TYPE, rawAttributeType,
                                   rawAssertionValue, null, null, null,
                                   matchingRuleID);
@@ -531,7 +531,7 @@
                                         MatchingRule matchingRule,
                                         AttributeValue assertionValue)
  {
    Validator.ensureNotNull(attributeType, matchingRule, assertionValue);
    Reject.ifNull(attributeType, matchingRule, assertionValue);
    String rawAttributeType = attributeType.getNameOrOID();
    String matchingRuleID = matchingRule.getOID();
    ByteString rawAssertionValue = assertionValue.getValue();
opendj3-server-dev/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
@@ -44,7 +44,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * This class implements version 2 of the proxied authorization control as
@@ -166,7 +166,7 @@
  {
    super(OID_PROXIED_AUTH_V2, isCritical);
    ensureNotNull(authorizationID);
    ifNull(authorizationID);
    this.authorizationID = authorizationID;
  }
opendj3-server-dev/src/server/org/opends/server/core/BaseDnRegistry.java
@@ -31,7 +31,7 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.ResultCode;
import org.opends.server.api.Backend;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import org.opends.messages.Message;
import static org.opends.messages.CoreMessages.*;
@@ -275,7 +275,7 @@
  {
    LinkedList<Message> errors = new LinkedList<Message>();
    ensureNotNull(baseDN);
    ifNull(baseDN);
    // Make sure that the Directory Server actually contains a backend with
    // the specified base DN.
opendj3-server-dev/src/server/org/opends/server/core/DirectoryServer.java
@@ -37,7 +37,7 @@
import static org.opends.server.util.DynamicConstants.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.io.*;
import java.lang.management.ManagementFactory;
@@ -89,6 +89,7 @@
import org.opends.server.tools.ConfigureWindowsService;
import org.opends.server.types.*;
import org.opends.server.util.*;
import org.forgerock.util.Reject;
import org.opends.server.util.args.*;
import org.opends.server.workflowelement.WorkflowElement;
import org.opends.server.workflowelement.WorkflowElementConfigManager;
@@ -2998,7 +2999,7 @@
  public static void setOfflineSchemaChanges(List<Modification>
                                                  offlineSchemaChanges)
  {
    ensureNotNull(offlineSchemaChanges);
    ifNull(offlineSchemaChanges);
    directoryServer.offlineSchemaChanges = offlineSchemaChanges;
  }
@@ -5023,7 +5024,7 @@
   */
  public static AuthenticationPolicy getAuthenticationPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    return directoryServer.authenticationPolicies.get(configEntryDN);
  }
@@ -5043,7 +5044,7 @@
  public static void registerAuthenticationPolicy(DN configEntryDN,
      AuthenticationPolicy policy)
  {
    Validator.ensureNotNull(configEntryDN, policy);
    Reject.ifNull(configEntryDN, policy);
    // Ensure default policy is synchronized.
    synchronized (directoryServer.authenticationPolicies)
@@ -5076,7 +5077,7 @@
   */
  public static void deregisterAuthenticationPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    // Ensure default policy is synchronized.
    synchronized (directoryServer.authenticationPolicies)
@@ -5184,7 +5185,7 @@
   */
  public static RotationPolicy getRotationPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    return directoryServer.rotationPolicies.get(configEntryDN);
  }
@@ -5201,7 +5202,7 @@
  public static void registerRotationPolicy(DN configEntryDN,
                                            RotationPolicy policy)
  {
    Validator.ensureNotNull(configEntryDN, policy);
    Reject.ifNull(configEntryDN, policy);
    directoryServer.rotationPolicies.put(configEntryDN, policy);
  }
@@ -5217,7 +5218,7 @@
   */
  public static void deregisterRotationPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    directoryServer.rotationPolicies.remove(configEntryDN);
  }
@@ -5234,7 +5235,7 @@
   */
  public static RetentionPolicy getRetentionPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    return directoryServer.retentionPolicies.get(configEntryDN);
  }
@@ -5251,7 +5252,7 @@
  public static void registerRetentionPolicy(DN configEntryDN,
                                            RetentionPolicy policy)
  {
    Validator.ensureNotNull(configEntryDN, policy);
    Reject.ifNull(configEntryDN, policy);
    directoryServer.retentionPolicies.put(configEntryDN, policy);
  }
@@ -5267,7 +5268,7 @@
   */
  public static void deregisterRetentionPolicy(DN configEntryDN)
  {
    Validator.ensureNotNull(configEntryDN);
    Reject.ifNull(configEntryDN);
    directoryServer.retentionPolicies.remove(configEntryDN);
  }
@@ -6015,10 +6016,10 @@
  public static void registerBackend(Backend backend)
         throws DirectoryException
  {
    ensureNotNull(backend);
    ifNull(backend);
    String backendID = backend.getBackendID();
    ensureNotNull(backendID);
    ifNull(backendID);
    synchronized (directoryServer)
    {
@@ -6064,7 +6065,7 @@
   */
  public static void deregisterBackend(Backend backend)
  {
    ensureNotNull(backend);
    ifNull(backend);
    synchronized (directoryServer)
    {
@@ -6226,7 +6227,7 @@
                                    boolean isPrivate)
         throws DirectoryException
  {
    ensureNotNull(baseDN, backend);
    ifNull(baseDN, backend);
    synchronized (directoryServer)
    {
@@ -6275,7 +6276,7 @@
  public static void deregisterBaseDN(DN baseDN)
         throws DirectoryException
  {
    ensureNotNull(baseDN);
    ifNull(baseDN);
    synchronized(directoryServer) {
@@ -9707,10 +9708,10 @@
   */
  public static void registerWorkflowElement(WorkflowElement we)
    throws DirectoryException {
    ensureNotNull(we);
    ifNull(we);
    String workflowElementID = we.getWorkflowElementID();
    ensureNotNull(workflowElementID);
    ifNull(workflowElementID);
    synchronized (directoryServer)
    {
@@ -9730,10 +9731,10 @@
   *                  {@code null}.
   */
  public static void deregisterWorkflowElement(WorkflowElement we) {
    ensureNotNull(we);
    ifNull(we);
    String workflowElementID = we.getWorkflowElementID();
    ensureNotNull(workflowElementID);
    ifNull(workflowElementID);
    synchronized (directoryServer)
    {
opendj3-server-dev/src/server/org/opends/server/core/WorkflowImpl.java
@@ -22,11 +22,12 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.core;
import static org.opends.messages.CoreMessages.*;
import static org.opends.server.util.Validator.ensureNotNull;
import static org.forgerock.util.Reject.ifNull;
import java.util.Collection;
import java.util.Observable;
@@ -216,7 +217,7 @@
  public void register()
      throws DirectoryException
  {
    ensureNotNull(workflowID);
    ifNull(workflowID);
    synchronized (registeredWorkflowsLock)
    {
@@ -241,7 +242,7 @@
   */
  public void deregister()
  {
    ensureNotNull(workflowID);
    ifNull(workflowID);
    // Deregister the workflow with the list of objects to notify when
    // a workflow element is created or deleted.
opendj3-server-dev/src/server/org/opends/server/core/networkgroups/NetworkGroup.java
@@ -33,7 +33,7 @@
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -1414,7 +1414,7 @@
   */
  void register() throws InitializationException
  {
    ensureNotNull(networkGroupID);
    ifNull(networkGroupID);
    synchronized (registeredNetworkGroupsLock)
    {
@@ -1564,7 +1564,7 @@
      throws DirectoryException
  {
    String workflowID = workflowNode.getWorkflowImpl().getWorkflowId();
    ensureNotNull(workflowID);
    ifNull(workflowID);
    // If the network group is the "internal" network group then bypass
    // the check because the internal network group may contain
@@ -1967,7 +1967,7 @@
      throws DirectoryException
  {
    String workflowID = workflowNode.getWorkflowImpl().getWorkflowId();
    ensureNotNull(workflowID);
    ifNull(workflowID);
    synchronized (registeredWorkflowNodesLock)
    {
opendj3-server-dev/src/server/org/opends/server/crypto/CryptoManagerImpl.java
@@ -66,7 +66,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.StaticUtils.*;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import org.opends.server.util.SelectableCertificateKeyManager;
import org.opends.server.util.StaticUtils;
import org.opends.server.util.Base64;
@@ -1378,7 +1378,7 @@
     * {@code KeyEntryID}.
     */
    public KeyEntryID(final byte[] keyEntryID) {
      Validator.ensureTrue(getByteValueLength() == keyEntryID.length);
      Reject.ifFalse(getByteValueLength() == keyEntryID.length);
      long hiBytes = 0;
      long loBytes = 0;
      for (int i = 0; i < 8; ++i) {
@@ -1854,8 +1854,8 @@
            final int ivLengthBits,
            final boolean isCompromised)
            throws CryptoManagerException {
      Validator.ensureNotNull(keyIDString, transformation, secretKey);
      Validator.ensureTrue(0 <= ivLengthBits);
      Reject.ifNull(keyIDString, transformation, secretKey);
      Reject.ifFalse(0 <= ivLengthBits);
      final KeyEntryID keyID = new KeyEntryID(keyIDString);
@@ -1920,8 +1920,8 @@
            final CryptoManagerImpl cryptoManager,
            final String transformation,
            final int keyLengthBits) {
      Validator.ensureNotNull(cryptoManager, transformation);
      Validator.ensureTrue(0 < keyLengthBits);
      Reject.ifNull(cryptoManager, transformation);
      Reject.ifFalse(0 < keyLengthBits);
      CipherKeyEntry keyEntry = null;
      // search for an existing key that satisfies the request
@@ -2082,7 +2082,7 @@
     * @param ivLengthBits The initiazliation vector length in bits.
     */
    private void setIVLengthBits(int ivLengthBits) {
      Validator.ensureTrue(-1 == fIVLengthBits && 0 <= ivLengthBits);
      Reject.ifFalse(-1 == fIVLengthBits && 0 <= ivLengthBits);
      fIVLengthBits = ivLengthBits;
    }
@@ -2131,13 +2131,13 @@
                                  final int mode,
                                  final byte[] initializationVector)
          throws CryptoManagerException {
    Validator.ensureTrue(Cipher.ENCRYPT_MODE == mode
    Reject.ifFalse(Cipher.ENCRYPT_MODE == mode
            || Cipher.DECRYPT_MODE == mode);
    Validator.ensureTrue(Cipher.ENCRYPT_MODE != mode
    Reject.ifFalse(Cipher.ENCRYPT_MODE != mode
            || null == initializationVector);
    Validator.ensureTrue(-1 != keyEntry.getIVLengthBits()
    Reject.ifFalse(-1 != keyEntry.getIVLengthBits()
            || Cipher.ENCRYPT_MODE == mode);
    Validator.ensureTrue(null == initializationVector
    Reject.ifFalse(null == initializationVector
            || initializationVector.length * Byte.SIZE
                                       == keyEntry.getIVLengthBits());
@@ -2237,7 +2237,7 @@
            final String algorithm,
            final int keyLengthBits)
    throws CryptoManagerException {
      Validator.ensureNotNull(algorithm);
      Reject.ifNull(algorithm);
      final Map<KeyEntryID, MacKeyEntry> cache = (null == cryptoManager)
              ? null : cryptoManager.macKeyEntryCache;
@@ -2392,7 +2392,7 @@
            final int secretKeyLengthBits,
            final boolean isCompromised)
            throws CryptoManagerException {
      Validator.ensureNotNull(keyIDString, secretKey);
      Reject.ifNull(keyIDString, secretKey);
      final KeyEntryID keyID = new KeyEntryID(keyIDString);
@@ -2451,8 +2451,8 @@
            final CryptoManagerImpl cryptoManager,
            final String algorithm,
            final int keyLengthBits) {
      Validator.ensureNotNull(cryptoManager, algorithm);
      Validator.ensureTrue(0 < keyLengthBits);
      Reject.ifNull(cryptoManager, algorithm);
      Reject.ifFalse(0 < keyLengthBits);
      MacKeyEntry keyEntry = null;
      // search for an existing key that satisfies the request
@@ -2717,7 +2717,7 @@
  public String getMacEngineKeyEntryID(final String macAlgorithm,
                                       final int keyLengthBits)
         throws CryptoManagerException {
    Validator.ensureNotNull(macAlgorithm);
    Reject.ifNull(macAlgorithm);
    MacKeyEntry keyEntry = MacKeyEntry.getKeyEntry(this, macAlgorithm,
                                                   keyLengthBits);
@@ -2755,7 +2755,7 @@
                        byte[] data)
         throws GeneralSecurityException, CryptoManagerException
  {
    Validator.ensureNotNull(cipherTransformation, data);
    Reject.ifNull(cipherTransformation, data);
    CipherKeyEntry keyEntry = CipherKeyEntry.getKeyEntry(this,
            cipherTransformation, keyLengthBits);
@@ -2801,7 +2801,7 @@
          OutputStream outputStream)
         throws CryptoManagerException
  {
    Validator.ensureNotNull(cipherTransformation, outputStream);
    Reject.ifNull(cipherTransformation, outputStream);
    CipherKeyEntry keyEntry = CipherKeyEntry.getKeyEntry(
            this, cipherTransformation, keyLengthBits);
opendj3-server-dev/src/server/org/opends/server/extensions/DynamicGroup.java
@@ -59,7 +59,7 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -112,7 +112,7 @@
  {
    super();
    ensureNotNull(groupEntryDN, memberURLs);
    ifNull(groupEntryDN, memberURLs);
    this.groupEntryDN = groupEntryDN;
    this.memberURLs   = memberURLs;
@@ -141,7 +141,7 @@
  public DynamicGroup newInstance(Entry groupEntry)
         throws DirectoryException
  {
    ensureNotNull(groupEntry);
    ifNull(groupEntry);
    // Get the memberURL attribute from the entry, if there is one, and parse
@@ -203,7 +203,7 @@
  @Override()
  public boolean isGroupDefinition(Entry entry)
  {
    ensureNotNull(entry);
    ifNull(entry);
    // FIXME -- This needs to exclude enhanced groups once we have support for
    //them.
opendj3-server-dev/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
@@ -47,7 +47,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.messages.ExtensionMessages.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -116,7 +116,7 @@
                                       DN baseDN, SearchScope scope,
                                       SearchFilter filter)
  {
    ensureNotNull(groupDN, memberDNs);
    ifNull(groupDN, memberDNs);
    this.groupDN   = groupDN;
    this.memberDNs = new ArrayList<ByteString>(memberDNs);
opendj3-server-dev/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.extensions;
import org.opends.messages.Message;
@@ -45,7 +45,7 @@
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.messages.ExtensionMessages.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -88,7 +88,7 @@
   */
  public SimpleStaticGroupMemberList(DN groupDN, Set<ByteString> memberDNs)
  {
    ensureNotNull(groupDN, memberDNs);
    ifNull(groupDN, memberDNs);
    this.groupDN   = groupDN;
    this.memberDNs = new ArrayList<ByteString>(memberDNs);
opendj3-server-dev/src/server/org/opends/server/extensions/StaticGroup.java
@@ -70,7 +70,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.protocols.internal.InternalClientConnection.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -140,7 +140,7 @@
    super();
    ensureNotNull(groupEntryDN, memberAttributeType, memberDNs);
    ifNull(groupEntryDN, memberAttributeType, memberDNs);
    this.groupEntryDN        = groupEntryDN;
    this.memberAttributeType = memberAttributeType;
@@ -170,7 +170,7 @@
  public StaticGroup newInstance(Entry groupEntry)
         throws DirectoryException
  {
    ensureNotNull(groupEntry);
    ifNull(groupEntry);
    // Determine whether it is a groupOfNames, groupOfEntries or
@@ -300,7 +300,7 @@
  @Override()
  public boolean isGroupDefinition(Entry entry)
  {
    ensureNotNull(entry);
    ifNull(entry);
    // FIXME -- This needs to exclude enhanced groups once we have support for
    //them.
@@ -404,7 +404,7 @@
  public void addNestedGroup(DN nestedGroupDN)
         throws UnsupportedOperationException, DirectoryException
  {
     ensureNotNull(nestedGroupDN);
     ifNull(nestedGroupDN);
    synchronized (this)
    {
@@ -465,7 +465,7 @@
  public void removeNestedGroup(DN nestedGroupDN)
         throws UnsupportedOperationException, DirectoryException
  {
    ensureNotNull(nestedGroupDN);
    ifNull(nestedGroupDN);
    synchronized (this)
    {
@@ -672,7 +672,7 @@
  public void addMember(Entry userEntry)
         throws UnsupportedOperationException, DirectoryException
  {
    ensureNotNull(userEntry);
    ifNull(userEntry);
    synchronized (this)
    {
@@ -729,7 +729,7 @@
  public void removeMember(DN userDN)
         throws UnsupportedOperationException, DirectoryException
  {
    ensureNotNull(userDN);
    ifNull(userDN);
    ByteString userDNString = ByteString.valueOf(userDN.toNormalizedString());
    synchronized (this)
opendj3-server-dev/src/server/org/opends/server/extensions/VirtualStaticGroup.java
@@ -56,7 +56,7 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -106,7 +106,7 @@
  {
    super();
    ensureNotNull(groupEntryDN, targetGroupDN);
    ifNull(groupEntryDN, targetGroupDN);
    this.groupEntryDN  = groupEntryDN;
    this.targetGroupDN = targetGroupDN;
@@ -135,7 +135,7 @@
  public VirtualStaticGroup newInstance(Entry groupEntry)
         throws DirectoryException
  {
    ensureNotNull(groupEntry);
    ifNull(groupEntry);
    // Get the target group DN attribute from the entry, if there is one.
@@ -212,7 +212,7 @@
  @Override()
  public boolean isGroupDefinition(Entry entry)
  {
    ensureNotNull(entry);
    ifNull(entry);
    // FIXME -- This needs to exclude enhanced groups once we have support for
    //them.
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -53,6 +53,7 @@
import org.opends.server.replication.server.changelog.api.DBCursor;
import org.opends.server.types.*;
import org.opends.server.util.*;
import org.forgerock.util.Reject;
import static java.util.Collections.*;
@@ -148,7 +149,7 @@
  {
    if (config != null)
    {
      Validator.ensureTrue(config instanceof BackendCfg);
      Reject.ifFalse(config instanceof BackendCfg);
      BackendCfg cfg = (BackendCfg) config;
      DN[] newBaseDNs = new DN[cfg.getBaseDN().size()];
      cfg.getBaseDN().toArray(newBaseDNs);
opendj3-server-dev/src/server/org/opends/server/schema/StringPrepProfile.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
@@ -32,7 +33,7 @@
import org.opends.server.types.ByteSequence;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import org.opends.server.util.Platform;
@@ -88,8 +89,8 @@
          boolean trim,
          boolean foldCase)
  {
    ensureNotNull(buffer);
    ensureNotNull(sequence);
    ifNull(buffer);
    ifNull(sequence);
    //Optimize in the case of purely ascii characters which is the most common
    //case.
    int length = sequence.length();
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2013 ForgeRock AS
 *      Portions Copyright 2013-2014 ForgeRock AS
 */
package org.opends.server.tools.dsconfig;
@@ -76,7 +76,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.tools.ClientException;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import org.opends.server.util.cli.CLIException;
import org.opends.server.util.cli.ConsoleApplication;
import org.opends.server.util.cli.HelpCallback;
@@ -696,7 +696,7 @@
    // Creates a new property editor for the specified property.
    private MultiValuedPropertyEditor(ManagedObject<?> mo,
        PropertyDefinition<?> pd) {
      Validator.ensureTrue(pd.hasOption(PropertyOption.MULTI_VALUED));
      Reject.ifFalse(pd.hasOption(PropertyOption.MULTI_VALUED));
      this.mo = mo;
      this.pd = pd;
@@ -1599,7 +1599,7 @@
    // Creates a new property editor for the specified property.
    private SingleValuedPropertyEditor(ManagedObject<?> mo,
        PropertyDefinition<?> pd) {
      Validator.ensureTrue(!pd.hasOption(PropertyOption.MULTI_VALUED));
      Reject.ifFalse(!pd.hasOption(PropertyOption.MULTI_VALUED));
      this.mo = mo;
      this.pd = pd;
opendj3-server-dev/src/server/org/opends/server/types/AbstractOperation.java
@@ -37,7 +37,7 @@
import org.opends.server.protocols.ldap.LDAPControl;
import org.opends.server.types.operation.PostResponseOperation;
import org.opends.server.types.operation.PreParseOperation;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.server.loggers.debug.DebugLogger.*;
@@ -407,7 +407,7 @@
  @Override
  public void addAdditionalLogItem(AdditionalLogItem item)
  {
    Validator.ensureNotNull(item);
    Reject.ifNull(item);
    if (additionalLogItems == null)
    {
      additionalLogItems = new LinkedList<AdditionalLogItem>();
opendj3-server-dev/src/server/org/opends/server/types/AdditionalLogItem.java
@@ -21,13 +21,13 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2011 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.types;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
@@ -59,7 +59,7 @@
  public static AdditionalLogItem keyOnly(final Class<?> source,
      final String key)
  {
    Validator.ensureNotNull(source, key);
    Reject.ifNull(source, key);
    return new AdditionalLogItem(source, key, null, false);
  }
@@ -80,7 +80,7 @@
  public static AdditionalLogItem quotedKeyValue(final Class<?> source,
      final String key, final Object value)
  {
    Validator.ensureNotNull(source, key, value);
    Reject.ifNull(source, key, value);
    return new AdditionalLogItem(source, key, value, true);
  }
@@ -102,7 +102,7 @@
  public static AdditionalLogItem unquotedKeyValue(final Class<?> source,
      final String key, final Object value)
  {
    Validator.ensureNotNull(source, key, value);
    Reject.ifNull(source, key, value);
    return new AdditionalLogItem(source, key, value, false);
  }
opendj3-server-dev/src/server/org/opends/server/types/AttributeBuilder.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2012-2013 ForgeRock AS
 *      Portions Copyright 2012-2014 ForgeRock AS
 */
package org.opends.server.types;
@@ -47,7 +47,7 @@
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
/**
@@ -1059,7 +1059,7 @@
    public void setInitialCapacity(int initialCapacity)
        throws IllegalStateException
    {
      Validator.ensureTrue(initialCapacity >= 0);
      Reject.ifFalse(initialCapacity >= 0);
      if (elements != null)
      {
@@ -1244,7 +1244,7 @@
   */
  public AttributeBuilder(AttributeType attributeType, String name)
  {
    Validator.ensureNotNull(attributeType, name);
    Reject.ifNull(attributeType, name);
    this.attributeType = attributeType;
    this.name = name;
@@ -1610,7 +1610,7 @@
      AttributeType attributeType,
      String name)
  {
    Validator.ensureNotNull(attributeType, name);
    Reject.ifNull(attributeType, name);
    this.attributeType = attributeType;
    this.name = name;
opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2013 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.types;
@@ -42,7 +42,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -276,7 +276,7 @@
        extraProperties);
    ensureNotNull(definition, oid);
    ifNull(definition, oid);
    this.superiorType = superiorType;
    this.isCollective = isCollective;
opendj3-server-dev/src/server/org/opends/server/types/AuthenticationInfo.java
@@ -26,7 +26,7 @@
 */
package org.opends.server.types;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * This class defines a data structure that may be used to store
@@ -129,7 +129,7 @@
  public AuthenticationInfo(Entry authenticationEntry, DN simpleBindDN,
      boolean isRoot)
  {
    ensureNotNull(authenticationEntry);
    ifNull(authenticationEntry);
    this.authenticationEntry = authenticationEntry;
    this.simpleBindDN        = simpleBindDN;
@@ -162,7 +162,7 @@
                            String saslMechanism,
                            boolean isRoot)
  {
    ensureNotNull(authenticationEntry, saslMechanism);
    ifNull(authenticationEntry, saslMechanism);
    this.authenticationEntry = authenticationEntry;
    this.isRoot              = isRoot;
@@ -206,7 +206,7 @@
                            ByteString saslCredentials,
                            boolean isRoot)
  {
    ensureNotNull(authenticationEntry, saslMechanism);
    ifNull(authenticationEntry, saslMechanism);
    this.authenticationEntry = authenticationEntry;
    this.authorizationEntry  = authorizationEntry;
opendj3-server-dev/src/server/org/opends/server/types/CommonSchemaElements.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2013 ForgeRock AS
 *      Portions Copyright 2013-2014 ForgeRock AS
 */
package org.opends.server.types;
@@ -30,7 +30,7 @@
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.toLowerCase;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.Collection;
import java.util.Collections;
@@ -467,7 +467,7 @@
   */
  public final void setExtraProperty(String name, String value) {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -500,7 +500,7 @@
  public final void setExtraProperty(String name,
                                     List<String> values) {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/DITContentRule.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.types;
@@ -41,7 +41,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -137,7 +137,7 @@
                        boolean isObsolete,
                        Map<String,List<String>> extraProperties)
  {
    ensureNotNull(definition, structuralClass);
    ifNull(definition, structuralClass);
    this.structuralClass = structuralClass;
    this.description     = description;
@@ -618,7 +618,7 @@
   */
  public void setExtraProperty(String name, String value)
  {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -646,7 +646,7 @@
   */
  public void setExtraProperty(String name, List<String> values)
  {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/DITStructureRule.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.types;
@@ -41,7 +41,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -117,7 +117,7 @@
                          Set<DITStructureRule> superiorRules,
                          Map<String,List<String>> extraProperties)
  {
    ensureNotNull(definition);
    ifNull(definition);
    this.ruleID      = ruleID;
    this.description = description;
@@ -440,7 +440,7 @@
   */
  public void setExtraProperty(String name, String value)
  {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -468,7 +468,7 @@
   */
  public void setExtraProperty(String name, List<String> values)
  {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/DN.java
@@ -38,7 +38,7 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * This class defines a data structure for storing and interacting
@@ -174,7 +174,7 @@
   */
  public DN(RDN rdn, DN parentDN)
  {
    ensureNotNull(rdn, parentDN);
    ifNull(rdn, parentDN);
    if (parentDN.isRootDN())
    {
      rdnComponents = new RDN[] { rdn };
opendj3-server-dev/src/server/org/opends/server/types/LDAPSyntaxDescription.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
@@ -37,7 +37,7 @@
import org.opends.server.schema.LDAPSyntaxDescriptionSyntax;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -92,7 +92,7 @@
                  String description,
                  Map<String,List<String>> extraProperties)
  {
    ensureNotNull(definition,descriptionSyntax);
    ifNull(definition,descriptionSyntax);
    this.descriptionSyntax = descriptionSyntax;
    this.oid = descriptionSyntax.getOID();
@@ -277,7 +277,7 @@
   */
  public void setExtraProperty(String name, String value)
  {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -305,7 +305,7 @@
   */
  public void setExtraProperty(String name, List<String> values)
  {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/MatchingRuleUse.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.types;
@@ -42,7 +42,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -119,7 +119,7 @@
                         Set<AttributeType> attributes,
                         Map<String,List<String>> extraProperties)
  {
    ensureNotNull(definition, matchingRule);
    ifNull(definition, matchingRule);
    this.matchingRule = matchingRule;
    this.description  = description;
@@ -419,7 +419,7 @@
   */
  public void setExtraProperty(String name, String value)
  {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -447,7 +447,7 @@
   */
  public void setExtraProperty(String name, List<String> values)
  {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/NameForm.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.types;
@@ -41,7 +41,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -125,7 +125,7 @@
                  Set<AttributeType> optionalAttributes,
                  Map<String,List<String>> extraProperties)
  {
    ensureNotNull(definition, oid, structuralClass);
    ifNull(definition, oid, structuralClass);
    this.oid             = oid;
    this.description     = description;
@@ -519,7 +519,7 @@
   */
  public void setExtraProperty(String name, String value)
  {
    ensureNotNull(name);
    ifNull(name);
    if (value == null)
    {
@@ -546,7 +546,7 @@
   */
  public void setExtraProperty(String name, List<String> values)
  {
    ensureNotNull(name);
    ifNull(name);
    if ((values == null) || values.isEmpty())
    {
opendj3-server-dev/src/server/org/opends/server/types/ObjectClass.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.server.types;
@@ -42,7 +42,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -167,7 +167,7 @@
        extraProperties);
    ensureNotNull(definition, oid);
    ifNull(definition, oid);
    // Construct unmodifiable views of the superior classes.
    if (superiorClasses != null) {
opendj3-server-dev/src/server/org/opends/server/types/RawAttribute.java
@@ -22,14 +22,14 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions copyright 2013 ForgeRock AS
 *      Portions Copyright 2013-2014 ForgeRock AS
 */
package org.opends.server.types;
import static org.opends.messages.ProtocolMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.io.IOException;
import java.util.ArrayList;
@@ -71,7 +71,7 @@
   */
  public static RawAttribute create(String attributeType)
  {
    ensureNotNull(attributeType);
    ifNull(attributeType);
    return new LDAPAttribute(attributeType);
  }
@@ -91,7 +91,7 @@
  public static RawAttribute create(String attributeType,
                                    String value)
  {
    ensureNotNull(attributeType, value);
    ifNull(attributeType, value);
    return new LDAPAttribute(attributeType, value);
  }
@@ -111,7 +111,7 @@
  public static RawAttribute create(String attributeType,
                                    ByteString value)
  {
    ensureNotNull(attributeType);
    ifNull(attributeType);
    return new LDAPAttribute(attributeType, value);
  }
@@ -130,7 +130,7 @@
  public static RawAttribute create(String attributeType,
                                    ArrayList<ByteString> values)
  {
    ensureNotNull(attributeType);
    ifNull(attributeType);
    return new LDAPAttribute(attributeType, values);
  }
@@ -147,7 +147,7 @@
   */
  public static RawAttribute create(Attribute attribute)
  {
    ensureNotNull(attribute);
    ifNull(attribute);
    return new LDAPAttribute(attribute);
  }
opendj3-server-dev/src/server/org/opends/server/types/ResultCode.java
@@ -22,13 +22,14 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.types;
import org.opends.messages.Message;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import static org.opends.messages.CoreMessages.*;
@@ -705,7 +706,7 @@
   */
  private ResultCode(int intValue, Message name)
  {
    Validator.ensureNotNull(name);
    Reject.ifNull(name);
    this.intValue       = intValue;
    this.resultCodeName = name;
  }
opendj3-server-dev/src/server/org/opends/server/types/VirtualAttributeRule.java
@@ -38,7 +38,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * This class defines a virtual attribute rule, which associates a
@@ -130,8 +130,8 @@
              VirtualAttributeCfgDefn.ConflictBehavior
                   conflictBehavior)
  {
    ensureNotNull(attributeType, provider, baseDNs, groupDNs);
    ensureNotNull(filters, conflictBehavior);
    ifNull(attributeType, provider, baseDNs, groupDNs);
    ifNull(filters, conflictBehavior);
    this.attributeType    = attributeType;
    this.provider         = provider;
opendj3-server-dev/src/server/org/opends/server/util/AddChangeRecordEntry.java
@@ -22,10 +22,11 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.ArrayList;
import java.util.Collections;
@@ -75,7 +76,7 @@
    super(dn);
    ensureNotNull(attributes);
    ifNull(attributes);
    this.attributes = new ArrayList<Attribute>(attributes.size());
opendj3-server-dev/src/server/org/opends/server/util/Base64.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
@@ -56,7 +57,7 @@
import static org.opends.messages.UtilityMessages.*;
import static org.opends.messages.ToolMessages.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -96,7 +97,7 @@
   */
  public static String encode(byte[] rawData)
  {
    ensureNotNull(rawData);
    ifNull(rawData);
    StringBuilder buffer = new StringBuilder(4 * rawData.length / 3);
@@ -143,7 +144,7 @@
   */
  public static String encode(ByteSequence rawData)
  {
    ensureNotNull(rawData);
    ifNull(rawData);
    StringBuilder buffer = new StringBuilder(4 * rawData.length() / 3);
@@ -199,7 +200,7 @@
  public static byte[] decode(String encodedData)
         throws ParseException
  {
    ensureNotNull(encodedData);
    ifNull(encodedData);
    // The encoded value must have  length that is a multiple of four bytes.
opendj3-server-dev/src/server/org/opends/server/util/ChangeRecordEntry.java
@@ -22,10 +22,11 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import org.opends.server.types.DN;
@@ -55,7 +56,7 @@
   */
  protected ChangeRecordEntry(DN dn)
  {
    ensureNotNull(dn);
    ifNull(dn);
    this.dn = dn;
  }
opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
@@ -30,7 +30,7 @@
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.io.*;
import java.net.URL;
@@ -131,7 +131,7 @@
  public LDIFReader(LDIFImportConfig importConfig)
         throws IOException
  {
    ensureNotNull(importConfig);
    ifNull(importConfig);
    this.importConfig = importConfig;
    reader               = importConfig.getReader();
@@ -165,7 +165,7 @@
  public LDIFReader(LDIFImportConfig importConfig, RootContainer rootContainer)
         throws IOException
  {
    ensureNotNull(importConfig);
    ifNull(importConfig);
    this.importConfig = importConfig;
    this.reader               = importConfig.getReader();
    this.lineNumber           = 0;
opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java
@@ -39,7 +39,7 @@
import org.opends.server.types.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
/**
 * This class provides a mechanism for writing entries in LDIF form to a file or
@@ -77,7 +77,7 @@
  public LDIFWriter(LDIFExportConfig exportConfig)
         throws IOException
  {
    ensureNotNull(exportConfig);
    ifNull(exportConfig);
    this.exportConfig = exportConfig;
    writer = exportConfig.getWriter();
@@ -112,7 +112,7 @@
  public void writeComment(Message comment, int wrapColumn)
         throws IOException
  {
    ensureNotNull(comment);
    ifNull(comment);
    // First, break up the comment into multiple lines to preserve the original
@@ -235,7 +235,7 @@
  public boolean writeEntry(Entry entry)
         throws IOException, LDIFException
  {
    ensureNotNull(entry);
    ifNull(entry);
    return entry.toLDIF(exportConfig);
  }
@@ -260,7 +260,7 @@
  public boolean writeTemplateEntry(TemplateEntry templateEntry)
  throws IOException, LDIFException
  {
    ensureNotNull(templateEntry);
    ifNull(templateEntry);
    return templateEntry.toLDIF(exportConfig);
  }
@@ -274,7 +274,7 @@
  public void writeChangeRecord(ChangeRecordEntry changeRecord)
         throws IOException
  {
    ensureNotNull(changeRecord);
    ifNull(changeRecord);
    // Get the information necessary to write the LDIF.
@@ -399,7 +399,7 @@
  public void writeAddChangeRecord(Entry entry)
         throws IOException
  {
    ensureNotNull(entry);
    ifNull(entry);
    // Get the information necessary to write the LDIF.
@@ -469,7 +469,7 @@
  public void writeDeleteChangeRecord(Entry entry, boolean commentEntry)
         throws IOException
  {
    ensureNotNull(entry);
    ifNull(entry);
    // Get the information necessary to write the LDIF.
    BufferedWriter writer     = exportConfig.getWriter();
@@ -540,7 +540,7 @@
  public void writeModifyChangeRecord(DN dn, List<Modification> modifications)
         throws IOException
  {
    ensureNotNull(dn, modifications);
    ifNull(dn, modifications);
    // If there aren't any modifications, then there's nothing to do.
    if (modifications.isEmpty())
@@ -621,7 +621,7 @@
                                        DN newSuperior)
         throws IOException
  {
    ensureNotNull(dn, newRDN);
    ifNull(dn, newRDN);
    // Get the information necessary to write the LDIF.
@@ -750,7 +750,7 @@
  public static void appendLDIFSeparatorAndValue(StringBuilder buffer,
      ByteSequence valueBytes, boolean isURL, boolean isBase64)
  {
    ensureNotNull(buffer, valueBytes);
    ifNull(buffer, valueBytes);
    // If the value is empty, then just append a single colon (the URL '<' if
@@ -805,7 +805,7 @@
                                   boolean wrapLines, int wrapColumn)
          throws IOException
  {
    ensureNotNull(line, writer);
    ifNull(line, writer);
    int length = line.length();
    if (wrapLines && length > wrapColumn)
opendj3-server-dev/src/server/org/opends/server/util/LevenshteinDistance.java
@@ -22,12 +22,13 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
@@ -92,7 +93,7 @@
   */
  public static int calculate(String source, String target)
  {
    ensureNotNull(source, target);
    ifNull(source, target);
    // sl == source length; tl == target length
    int sl = source.length();
opendj3-server-dev/src/server/org/opends/server/util/ModifyChangeRecordEntry.java
@@ -22,10 +22,11 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import java.util.ArrayList;
import java.util.Collection;
@@ -71,7 +72,7 @@
    super(dn);
    ensureNotNull(modifications);
    ifNull(modifications);
    this.modifications = new ArrayList<RawModification>(modifications);
  }
opendj3-server-dev/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java
@@ -22,10 +22,11 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
import static org.opends.server.util.Validator.*;
import static org.forgerock.util.Reject.*;
import org.opends.server.types.DN;
import org.opends.server.types.RDN;
@@ -73,7 +74,7 @@
  {
    super(dn);
    ensureNotNull(newRDN);
    ifNull(newRDN);
    this.newSuperiorDN = newSuperiorDN;
    this.newRDN = newRDN;
opendj3-server-dev/src/server/org/opends/server/util/MultiOutputStream.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
@@ -30,6 +31,8 @@
import java.io.OutputStream;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.forgerock.util.Reject;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
@@ -69,7 +72,7 @@
   */
  public MultiOutputStream(OutputStream... targetStreams)
  {
    Validator.ensureNotNull(targetStreams);
    Reject.ifNull(targetStreams);
    this.targetStreams = targetStreams;
  }
opendj3-server-dev/src/server/org/opends/server/util/StaticUtils.java
@@ -43,6 +43,7 @@
import javax.naming.NamingException;
import javax.naming.ldap.InitialLdapContext;
import org.forgerock.util.Reject;
import org.opends.messages.Message;
import org.opends.messages.MessageBuilder;
import org.opends.messages.MessageDescriptor;
@@ -165,7 +166,7 @@
   */
  public static String decodeUTF8(final byte[] bytes)
  {
    Validator.ensureNotNull(bytes);
    Reject.ifNull(bytes);
    if (bytes.length == 0)
    {
@@ -3937,7 +3938,7 @@
   */
  public static String wrapText(String text, int width, int indent)
  {
    Validator.ensureTrue(indent >= 0 && indent < width);
    Reject.ifFalse(indent >= 0 && indent < width);
    // Calculate the real width and indentation padding.
    width -= indent;
opendj3-server-dev/src/server/org/opends/server/util/Validator.java
File was deleted
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -52,7 +52,7 @@
import org.opends.server.types.operation.PostResponseModifyOperation;
import org.opends.server.types.operation.PostSynchronizationModifyOperation;
import org.opends.server.types.operation.PreOperationModifyOperation;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines an operation used to modify an entry in a local backend
@@ -1503,7 +1503,7 @@
   */
  private void validateObjectClasses(Attribute attr) throws DirectoryException
  {
    Validator.ensureTrue(attr.getAttributeType().isObjectClassType());
    Reject.ifFalse(attr.getAttributeType().isObjectClassType());
    for (AttributeValue v : attr)
    {
      String name = v.getValue().toString();
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/BooleanPropertyDefinitionTest.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -44,7 +45,7 @@
  /**
   * Sets up tests.
   *
   *
   * @throws Exception
   *           If the server could not be initialized.
   */
@@ -70,7 +71,7 @@
  /**
   * Tests validateValue() with illegal data
   */
  @Test(expectedExceptions = AssertionError.class)
  @Test(expectedExceptions = NullPointerException.class)
  public void testValidateValue2() {
    BooleanPropertyDefinition d = createPropertyDefinition();
    d.validateValue(null);
@@ -113,7 +114,7 @@
   * @param value to decode
   */
  @Test(dataProvider = "testDecodeValueData2",
          expectedExceptions = {AssertionError.class,IllegalPropertyValueStringException.class})
          expectedExceptions = {NullPointerException.class,IllegalPropertyValueStringException.class})
  public void testDecodeValue2(String value) {
    BooleanPropertyDefinition d = createPropertyDefinition();
    d.decodeValue(value);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/EnumPropertyDefinitionTest.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin;
@@ -116,7 +117,7 @@
   * @param value to decode
   */
  @Test(dataProvider = "decodeValueData2",
          expectedExceptions = {AssertionError.class,
          expectedExceptions = {NullPointerException.class,
                  IllegalPropertyValueStringException.class} )
  public void testDecodeValue2(String value) {
    EnumPropertyDefinition epd = builder.getInstance();
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client.ldap;
@@ -39,7 +40,7 @@
import javax.naming.directory.Attributes;
import javax.naming.ldap.LdapName;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import org.testng.Assert;
@@ -88,9 +89,9 @@
   */
  public void addExpectedAttribute(String expectedName,
      String... expectedValues) {
    Validator.ensureNotNull(expectedName);
    Validator.ensureNotNull(expectedValues);
    Validator.ensureTrue(expectedValues.length > 0);
    Reject.ifNull(expectedName);
    Reject.ifNull(expectedValues);
    Reject.ifFalse(expectedValues.length > 0);
    attributes.put(expectedName, Arrays.asList(expectedValues));
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.admin.client.ldap;
@@ -39,7 +40,7 @@
import javax.naming.directory.Attributes;
import javax.naming.ldap.LdapName;
import org.opends.server.util.Validator;
import org.forgerock.util.Reject;
import org.testng.Assert;
@@ -90,8 +91,8 @@
   */
  public void addExpectedModification(String expectedName,
      String... expectedValues) {
    Validator.ensureNotNull(expectedName);
    Validator.ensureNotNull(expectedValues);
    Reject.ifNull(expectedName);
    Reject.ifNull(expectedValues);
    modifications.put(expectedName, Arrays.asList(expectedValues));
  }
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/controls/ProxiedAuthV2ControlTestCase.java
@@ -67,7 +67,7 @@
  /**
   * Tests the constructor with a {@code null} authorization ID.
   */
  @Test(expectedExceptions = { AssertionError.class })
  @Test(expectedExceptions = { NullPointerException.class })
  public void testConstructorNullAuthzID()
  {
    new ProxiedAuthV2Control(null);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidatorTestCase.java
@@ -55,7 +55,7 @@
/**
 * A set of test cases for the Similarity-Based Password Validator.
 * A set of test cases for the Similarity-Based Password Reject.
 */
public class SimilarityBasedPasswordValidatorTestCase
       extends ExtensionsTestCase
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/LevenshteinDistanceTestCase.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.server.util;
@@ -160,7 +161,7 @@
      // ===+++======= --> 3
      new Object[] { "brad+angelina", "brangelina", 3 },
      // test international chars
      // test international chars
      // ?e?uli?ka
      //  e?uli?ka
      // -======== --> 1
@@ -229,7 +230,7 @@
   * @param  t  The target string to compare.
   */
  @Test(dataProvider = "testnulls",
        expectedExceptions = { AssertionError.class })
        expectedExceptions = { NullPointerException.class })
  public void testNullStrings(String s, String t)
  {
    LevenshteinDistance.calculate(s, t);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/util/ValidatorTests.java
File was deleted