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

Matthew Swift
19.51.2013 813c78e0dd2862ff7eb2c80963d80ab81e1c1bf9
Minor refactoring: remove Validator class and use forgerock-util Reject instead.
156 files modified
1 files deleted
1517 ■■■■ changed files
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ACIPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/AttributeTypePropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/BooleanPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassLoaderProvider.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java 13 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DNPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/EnumPropertyDefinition.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IPAddressPropertyDefinition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/InstantiableRelationDefinition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IntegerPropertyDefinition.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java 23 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/RelationDefinition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/SizePropertyDefinition.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/StringPropertyDefinition.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/Tag.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/ManagedObjectDecodingException.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/MissingMandatoryPropertiesException.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/OperationRejectedException.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagementContext.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/server/ConstraintViolationException.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDecodingException.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/pom.xml 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/AccountUsabilityRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/AccountUsabilityResponseControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/RealAttributesOnlyRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/VirtualAttributesOnlyRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/GetConnectionIDExtendedResult.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/CompletedFutureResult.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/SubstringReader.java 4 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/Validator.java 176 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractAttribute.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnectionWrapper.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractEntry.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java 7 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractMapEntry.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java 17 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/CachedConnectionPool.java 19 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java 23 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java 20 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DecodeOptions.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java 10 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/ErrorResultIOException.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java 54 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/GeneralizedTime.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java 10 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/InternalConnection.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java 15 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListenerOptions.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPOptions.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java 14 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LinkedAttribute.java 14 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LinkedHashMapEntry.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancer.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RDN.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RequestHandlerFactoryAdapter.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RootDSE.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/SearchResultReferenceIOException.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java 18 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/TreeMapEntry.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AssertionRequestControl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AuthorizationIdentityRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AuthorizationIdentityResponseControl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/GenericControl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/GetEffectiveRightsRequestControl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ManageDsaITRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/MatchedValuesRequestControl.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordExpiredResponseControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordExpiringResponseControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyResponseControl.java 15 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PermissiveModifyRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PersistentSearchRequestControl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PostReadRequestControl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PostReadResponseControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PreReadRequestControl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PreReadResponseControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ProxiedAuthV1RequestControl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ProxiedAuthV2RequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortRequestControl.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SimplePagedResultsControl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SubentriesRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SubtreeDeleteRequestControl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/VirtualListViewRequestControl.java 19 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/VirtualListViewResponseControl.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AnonymousSASLBindRequestImpl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CompareRequestImpl.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DeleteRequestImpl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java 16 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java 18 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GenericBindRequestImpl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GenericExtendedRequestImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyDNRequestImpl.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java 13 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java 50 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/SearchRequestImpl.java 19 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/SimpleBindRequestImpl.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/StartTLSExtendedRequestImpl.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResultImpl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java 18 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/SearchResultReferenceImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumOrderingMatchingRule.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/RegexSyntaxImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Schema.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java 28 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/AbstractLDIFReader.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/AbstractLDIFWriter.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionChangeRecordWriter.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryWriter.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/EntryGenerator.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordReader.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordWriter.java 20 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFEntryReader.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFEntryWriter.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnection.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/LDAPServerFilter.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/DataSource.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/pom.xml 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ACIPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import org.opends.server.authorization.dseecompat.Aci;
import org.opends.server.authorization.dseecompat.AciException;
@@ -102,7 +102,7 @@
  @Override
  public void validateValue(Aci value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    Reject.ifNull(value);
    // No additional validation required.
  }
@@ -113,7 +113,7 @@
  @Override
  public Aci decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    Reject.ifNull(value);
    try {
      return Aci.decode(ByteString.valueOf(value), DN.rootDN());
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/AggregationPropertyDefinition.java
@@ -27,7 +27,7 @@
import static com.forgerock.opendj.ldap.AdminMessages.*;
import static com.forgerock.opendj.util.StaticUtils.*;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.Collection;
import java.util.Collections;
@@ -804,7 +804,7 @@
     */
    @Override
    public String decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            validateValue(value);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/AttributeTypePropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -139,7 +139,7 @@
     */
    @Override
    public AttributeType decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        String name = value.trim().toLowerCase();
        AttributeType type = DirectoryServer.getAttributeType(name, !isCheckSchema);
@@ -169,7 +169,7 @@
     */
    @Override
    public void validateValue(AttributeType value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // No implementation required.
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/BooleanPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
import java.util.HashMap;
@@ -120,7 +120,7 @@
  @Override
  public void validateValue(Boolean value)
      throws IllegalPropertyValueException {
    ensureNotNull(value);
    Reject.ifNull(value);
    // No additional validation required.
  }
@@ -133,7 +133,7 @@
  @Override
  public Boolean decodeValue(String value)
      throws IllegalPropertyValueStringException {
    ensureNotNull(value);
    Reject.ifNull(value);
    String nvalue = value.trim().toLowerCase();
    Boolean b = VALUE_MAP.get(nvalue);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassLoaderProvider.java
@@ -29,7 +29,7 @@
import static com.forgerock.opendj.ldap.AdminMessages.*;
import static com.forgerock.opendj.ldap.ExtensionMessages.*;
import static com.forgerock.opendj.util.StaticUtils.*;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.io.ByteArrayOutputStream;
import java.io.BufferedReader;
@@ -194,7 +194,7 @@
     */
    public synchronized void addExtension(String... extensions) throws InitializationException, IllegalStateException,
            IllegalArgumentException {
        ensureNotNull(extensions);
        Reject.ifNull(extensions);
        if (loader == null) {
            throw new IllegalStateException("Class loader provider is disabled.");
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
@@ -27,7 +27,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.Collections;
import java.util.EnumSet;
@@ -71,7 +71,7 @@
         *            The name of a class which property values must implement.
         */
        public final void addInstanceOf(String className) {
            ensureNotNull(className);
            Reject.ifNull(className);
            /*
             * Do some basic checks to make sure the string representation is
@@ -204,7 +204,7 @@
     */
    @Override
    public String decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            validateValue(value);
@@ -247,7 +247,8 @@
     */
    public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf)
            throws IllegalPropertyValueException, ClassCastException {
        ensureNotNull(className, instanceOf);
        Reject.ifNull(className);
        Reject.ifNull(instanceOf);
        // Make sure that the named class is valid.
        validateClassName(className);
@@ -262,7 +263,7 @@
     */
    @Override
    public String normalizeValue(String value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        return value.trim();
    }
@@ -272,7 +273,7 @@
     */
    @Override
    public void validateValue(String value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // Always make sure the name is a valid class name.
        validateClassName(value);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DNPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -135,7 +135,7 @@
     */
    @Override
    public void validateValue(DN value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (baseDN != null) {
            DN parent = value.parent();
@@ -155,7 +155,7 @@
     */
    @Override
    public DN decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            // TODO: is it correct to replace server DN.decode by SDK valueOf ?
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -121,7 +121,7 @@
         *             maximum unit.
         */
        public final void setBaseUnit(String unit) throws IllegalArgumentException {
            ensureNotNull(unit);
            Reject.ifNull(unit);
            setBaseUnit(DurationUnit.getUnit(unit));
        }
@@ -138,7 +138,7 @@
         *             unit.
         */
        public final void setBaseUnit(DurationUnit unit) throws IllegalArgumentException {
            ensureNotNull(unit);
            Reject.ifNull(unit);
            // Make sure that the base unit is not bigger than the maximum
            // unit.
@@ -393,7 +393,7 @@
     */
    @Override
    public void validateValue(Long value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        long nvalue = baseUnit.toMilliSeconds(value);
        if (!allowUnlimited && nvalue < lowerLimit) {
@@ -414,7 +414,7 @@
     */
    @Override
    public String encodeValue(Long value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // Make sure that we correctly encode negative values as
        // "unlimited".
@@ -437,7 +437,7 @@
     */
    @Override
    public Long decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // First check for the special "unlimited" value when necessary.
        if (allowUnlimited) {
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/EnumPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
import java.util.HashMap;
@@ -152,7 +152,7 @@
     */
    @Override
    public E decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        String nvalue = value.trim().toLowerCase();
        E eValue = decodeMap.get(nvalue);
@@ -211,7 +211,7 @@
     */
    @Override
    public String normalizeValue(E value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        return value.toString().trim().toLowerCase();
    }
@@ -221,7 +221,7 @@
     */
    @Override
    public void validateValue(E value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // No additional validation required.
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IPAddressMaskPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -87,7 +87,7 @@
     */
    @Override
    public void validateValue(AddressMask value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // No additional validation required.
    }
@@ -97,7 +97,7 @@
     */
    @Override
    public AddressMask decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            return AddressMask.decode(value);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IPAddressPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.net.InetAddress;
import java.net.UnknownHostException;
@@ -86,7 +86,7 @@
     */
    @Override
    public void validateValue(InetAddress value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // No additional validation required.
    }
@@ -96,7 +96,7 @@
     */
    @Override
    public InetAddress decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            return InetAddress.getByName(value);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/InstantiableRelationDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.Collections;
import java.util.HashMap;
@@ -116,7 +116,7 @@
         *            relation does not use a property for naming.
         */
        public void setNamingProperty(PropertyDefinition<?> namingPropertyDefinition) {
            ensureNotNull(namingPropertyDefinition);
            Reject.ifNull(namingPropertyDefinition);
            this.namingPropertyDefinition = namingPropertyDefinition;
        }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/IntegerPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
import java.util.Locale;
@@ -230,7 +230,7 @@
     */
    @Override
    public void validateValue(Integer value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (!allowUnlimited && value < lowerLimit) {
            throw new IllegalPropertyValueException(this, value);
@@ -250,7 +250,7 @@
     */
    @Override
    public String encodeValue(Integer value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // Make sure that we correctly encode negative values as "unlimited".
        if (allowUnlimited) {
@@ -267,7 +267,7 @@
     */
    @Override
    public Integer decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (allowUnlimited) {
            if (value.trim().equalsIgnoreCase(UNLIMITED)) {
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.Comparator;
import java.util.EnumSet;
@@ -109,7 +109,7 @@
         *            The administrator action.
         */
        public final void setAdministratorAction(AdministratorAction adminAction) {
            ensureNotNull(adminAction);
            Reject.ifNull(adminAction);
            this.adminAction = adminAction;
        }
@@ -120,7 +120,7 @@
         *            The default behavior provider.
         */
        public final void setDefaultBehaviorProvider(DefaultBehaviorProvider<T> defaultBehavior) {
            ensureNotNull(defaultBehavior);
            Reject.ifNull(defaultBehavior);
            this.defaultBehavior = defaultBehavior;
        }
@@ -131,7 +131,7 @@
         *            The property option.
         */
        public final void setOption(PropertyOption option) {
            ensureNotNull(option);
            Reject.ifNull(option);
            options.add(option);
        }
@@ -193,8 +193,12 @@
     */
    protected PropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, Class<T> theClass, String propertyName,
            EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<T> defaultBehavior) {
        ensureNotNull(d, theClass, propertyName);
        ensureNotNull(options, adminAction, defaultBehavior);
        Reject.ifNull(d);
        Reject.ifNull(theClass);
        Reject.ifNull(propertyName);
        Reject.ifNull(options);
        Reject.ifNull(adminAction);
        Reject.ifNull(defaultBehavior);
        this.definition = d;
        this.theClass = theClass;
@@ -282,7 +286,8 @@
     *         argument is less than, equal to, or greater than the second.
     */
    public int compare(T o1, T o2) {
        ensureNotNull(o1, o2);
        Reject.ifNull(o1);
        Reject.ifNull(o2);
        String s1 = normalizeValue(o1);
        String s2 = normalizeValue(o2);
@@ -337,7 +342,7 @@
     *             If the property value is invalid.
     */
    public String encodeValue(T value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        return value.toString();
    }
@@ -522,7 +527,7 @@
     *             If the property value is invalid.
     */
    public String normalizeValue(T value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        return encodeValue(value);
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/RelationDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
import java.util.Locale;
@@ -129,7 +129,7 @@
         *            The relation option.
         */
        public final void setOption(RelationOption option) {
            ensureNotNull(option);
            Reject.ifNull(option);
            common.options.add(option);
        }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/SizePropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -232,7 +232,7 @@
     */
    @Override
    public void validateValue(Long value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (!allowUnlimited && value < lowerLimit) {
            throw new IllegalPropertyValueException(this, value);
@@ -252,7 +252,7 @@
     */
    @Override
    public String encodeValue(Long value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // Make sure that we correctly encode negative values as "unlimited".
        if (allowUnlimited) {
@@ -278,7 +278,7 @@
     */
    @Override
    public Long decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        // First check for the special "unlimited" value when necessary.
        if (allowUnlimited) {
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/StringPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.EnumSet;
import java.util.Locale;
@@ -171,7 +171,7 @@
     */
    @Override
    public String decodeValue(String value) throws IllegalPropertyValueStringException {
        ensureNotNull(value);
        Reject.ifNull(value);
        try {
            validateValue(value);
@@ -256,7 +256,7 @@
     */
    @Override
    public String normalizeValue(String value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (isCaseInsensitive()) {
            return value.trim().toLowerCase();
@@ -270,7 +270,7 @@
     */
    @Override
    public void validateValue(String value) throws IllegalPropertyValueException {
        ensureNotNull(value);
        Reject.ifNull(value);
        if (pattern != null) {
            Matcher matcher = pattern.matcher(value);
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/Tag.java
@@ -25,7 +25,7 @@
 */
package org.opends.server.admin;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.Collection;
import java.util.Collections;
@@ -71,7 +71,7 @@
     *             If the tag name was not recognized.
     */
    public static Tag valueOf(String name) throws IllegalArgumentException {
        ensureNotNull(name);
        Reject.ifNull(name);
        // Hack to force initialization of the tag definitions.
        RootCfgDefn.getInstance();
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/ManagedObjectDecodingException.java
@@ -36,12 +36,11 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.util.Reject;
import org.opends.server.admin.DecodingException;
import org.opends.server.admin.ManagedObjectDefinition;
import org.opends.server.admin.PropertyException;
import com.forgerock.opendj.util.Validator;
/**
@@ -60,8 +59,8 @@
  // Create the message.
  private static LocalizableMessage createMessage(ManagedObject<?> partialManagedObject,
      Collection<PropertyException> causes) {
    Validator.ensureNotNull(causes);
    Validator.ensureTrue(!causes.isEmpty(), "causes should not be empty");
    Reject.ifNull(causes);
    Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
    ManagedObjectDefinition<?, ?> d = partialManagedObject
        .getManagedObjectDefinition();
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/MissingMandatoryPropertiesException.java
@@ -36,11 +36,10 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.util.Reject;
import org.opends.server.admin.OperationsException;
import org.opends.server.admin.PropertyIsMandatoryException;
import com.forgerock.opendj.util.Validator;
/**
@@ -60,8 +59,8 @@
  // Create the message.
  private static LocalizableMessage createMessage(
      Collection<PropertyIsMandatoryException> causes) {
    Validator.ensureNotNull(causes);
    Validator.ensureTrue(!causes.isEmpty(), "causes should not be empty");
    Reject.ifNull(causes);
    Reject.ifFalse(!causes.isEmpty(), "causes should not be empty");
    if (causes.size() == 1) {
      return ERR_MISSING_MANDATORY_PROPERTIES_EXCEPTION_SINGLE.get(causes
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/OperationRejectedException.java
@@ -34,8 +34,7 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This exception is thrown when the client or server refuses to create, delete,
@@ -77,8 +76,8 @@
    // Gets the default message.
    private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
        Validator.ensureNotNull(messages);
        Validator.ensureTrue(!messages.isEmpty(), "Messages should not be empty");
        Reject.ifNull(messages);
        Reject.ifFalse(!messages.isEmpty(), "Messages should not be empty");
        if (messages.size() == 1) {
            return ERR_OPERATION_REJECTED_EXCEPTION_SINGLE.get(messages.iterator().next());
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/client/ldap/LDAPManagementContext.java
@@ -30,7 +30,7 @@
import org.opends.server.admin.client.ManagementContext;
import org.opends.server.admin.client.spi.Driver;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDAP management connection context.
@@ -45,7 +45,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());
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ANDCondition.java
@@ -35,7 +35,7 @@
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A condition which evaluates to <code>true</code> if and only if all of its
@@ -53,7 +53,7 @@
     *            The sub-conditions which will be combined using a logical AND.
     */
    public ANDCondition(Condition... conditions) {
        Validator.ensureNotNull(conditions);
        Reject.ifNull(conditions);
        this.conditions = Arrays.asList(conditions);
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
@@ -28,6 +28,7 @@
import java.util.SortedSet;
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.util.Reject;
import org.opends.server.admin.AbstractManagedObjectDefinition;
import org.opends.server.admin.IllegalPropertyValueStringException;
import org.opends.server.admin.PropertyDefinition;
@@ -36,8 +37,6 @@
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import com.forgerock.opendj.util.Validator;
/**
 * A condition which evaluates to <code>true</code> if and only if a property
 * contains a particular value.
@@ -112,7 +111,8 @@
     *            The string representation of the required property value.
     */
    public ContainsCondition(String propertyName, String stringValue) {
        Validator.ensureNotNull(propertyName, stringValue);
        Reject.ifNull(propertyName);
        Reject.ifNull(stringValue);
        this.propertyName = propertyName;
        this.propertyStringValue = stringValue;
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/IsPresentCondition.java
@@ -35,7 +35,7 @@
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A condition which evaluates to <code>true</code> if and only if a particular
@@ -56,7 +56,7 @@
     *            The property name.
     */
    public IsPresentCondition(String propertyName) {
        Validator.ensureNotNull(propertyName);
        Reject.ifNull(propertyName);
        this.propertyName = propertyName;
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/NOTCondition.java
@@ -32,7 +32,7 @@
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A condition which evaluates to <code>true</code> if the sub-condition is
@@ -51,7 +51,7 @@
     *            The sub-condition which will be inverted.
     */
    public NOTCondition(Condition condition) {
        Validator.ensureNotNull(condition);
        Reject.ifNull(condition);
        this.condition = condition;
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/condition/ORCondition.java
@@ -35,7 +35,7 @@
import org.opends.server.admin.server.ServerManagedObject;
import org.opends.server.config.ConfigException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A condition which evaluates to <code>false</code> if and only if all of its
@@ -53,7 +53,7 @@
     *            The sub-conditions which will be combined using a logical OR.
     */
    public ORCondition(Condition... conditions) {
        Validator.ensureNotNull(conditions);
        Reject.ifNull(conditions);
        this.conditions = Arrays.asList(conditions);
    }
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/server/ConstraintViolationException.java
@@ -26,7 +26,7 @@
package org.opends.server.admin.server;
import static com.forgerock.opendj.ldap.AdminMessages.*;
import static com.forgerock.opendj.util.Validator.*;
import org.forgerock.util.Reject;
import java.util.ArrayList;
import java.util.Collection;
@@ -52,8 +52,8 @@
    // Gets the default message.
    private static LocalizableMessage getDefaultMessage(Collection<LocalizableMessage> messages) {
        ensureNotNull(messages);
        ensureTrue(!messages.isEmpty(), "messages should not be empty");
        Reject.ifNull(messages);
        Reject.ifFalse(!messages.isEmpty(), "messages should not be empty");
        if (messages.size() == 1) {
            return ERR_CONSTRAINT_VIOLATION_EXCEPTION_SINGLE.get(messages.iterator().next());
opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/server/ServerManagedObjectDecodingException.java
@@ -34,10 +34,10 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.util.Reject;
import org.opends.server.admin.DecodingException;
import org.opends.server.admin.ManagedObjectDefinition;
import org.opends.server.admin.PropertyException;
import static com.forgerock.opendj.util.Validator.*;
/**
 * The requested server managed object was found but one or more of its
@@ -53,8 +53,8 @@
    // Create the message.
    private static LocalizableMessage createMessage(ServerManagedObject<?> partialManagedObject,
            Collection<PropertyException> causes) {
        ensureNotNull(causes);
        ensureTrue(!causes.isEmpty(), "causes should nnot be empty");
        Reject.ifNull(causes);
        Reject.ifFalse(!causes.isEmpty(), "causes should nnot be empty");
        ManagedObjectDefinition<?, ?> d = partialManagedObject.getManagedObjectDefinition();
        if (causes.size() == 1) {
opendj-sdk/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java
@@ -34,10 +34,9 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.util.Reject;
import org.testng.Assert;
import com.forgerock.opendj.util.Validator;
/**
 * A mock LDAP connection which is used to verify that an add operation was
 * requested and that it has the correct parameters.
@@ -73,9 +72,9 @@
     *            The attribute's expected values (never empty).
     */
    public void addExpectedAttribute(String expectedName, String... expectedValues) {
        Validator.ensureNotNull(expectedName);
        Validator.ensureNotNull(expectedValues);
        Validator.ensureTrue(expectedValues.length > 0, "should have at least one expected value");
        Reject.ifNull(expectedName);
        Reject.ifNull(expectedValues);
        Reject.ifFalse(expectedValues.length > 0, "should have at least one expected value");
        attributes.put(expectedName, Arrays.asList(expectedValues));
    }
opendj-sdk/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/ModifyEntryMockLDAPConnection.java
@@ -37,7 +37,7 @@
import org.forgerock.opendj.ldap.requests.ModifyRequest;
import org.testng.Assert;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A mock LDAP connection which is used to verify that a modify operation was
@@ -74,8 +74,8 @@
     *            deleted).
     */
    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));
    }
opendj-sdk/opendj-core/pom.xml
@@ -49,6 +49,10 @@
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.forgerock.commons</groupId>
      <artifactId>forgerock-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.forgerock</groupId>
      <artifactId>forgerock-build-tools</artifactId>
      <version>${forgerockBuildToolsVersion}</version>
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/AccountUsabilityRequestControl.java
@@ -35,7 +35,7 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Sun-defined account usability request control. The OID for this control
@@ -65,7 +65,7 @@
                public AccountUsabilityRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof AccountUsabilityRequestControl) {
                        return (AccountUsabilityRequestControl) control;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/AccountUsabilityResponseControl.java
@@ -47,7 +47,7 @@
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Sun-defined account usability response control. The OID for this control
@@ -84,7 +84,7 @@
                public AccountUsabilityResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof AccountUsabilityResponseControl) {
                        return (AccountUsabilityResponseControl) control;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/RealAttributesOnlyRequestControl.java
@@ -35,7 +35,7 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Sun-defined real attributes only request control. The OID for this
@@ -62,7 +62,7 @@
                public RealAttributesOnlyRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof RealAttributesOnlyRequestControl) {
                        return (RealAttributesOnlyRequestControl) control;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/VirtualAttributesOnlyRequestControl.java
@@ -35,7 +35,7 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Sun-defined virtual attributes only request control. The OID for this
@@ -62,7 +62,7 @@
                public VirtualAttributesOnlyRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof VirtualAttributesOnlyRequestControl) {
                        return (VirtualAttributesOnlyRequestControl) control;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/GetConnectionIDExtendedResult.java
@@ -36,7 +36,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.responses.AbstractExtendedResult;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Get connection ID extended result.
@@ -56,7 +56,7 @@
     *             If {@code resultCode} was {@code null}.
     */
    public static GetConnectionIDExtendedResult newResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new GetConnectionIDExtendedResult(resultCode);
    }
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/CompletedFutureResult.java
@@ -32,6 +32,7 @@
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.FutureResult;
import org.forgerock.util.Reject;
/**
 * An implementation of {@code FutureResult} which can be used in cases where
@@ -73,7 +74,7 @@
     *             If {@code errorResult} was {@code null}.
     */
    public CompletedFutureResult(final ErrorResultException errorResult, final int requestID) {
        Validator.ensureNotNull(errorResult);
        Reject.ifNull(errorResult);
        this.result = null;
        this.errorResult = errorResult;
        this.requestID = requestID;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
@@ -63,6 +63,7 @@
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.forgerock.opendj.ldap.ProviderNotFoundException;
import org.forgerock.opendj.ldap.spi.Provider;
import org.forgerock.util.Reject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -1771,7 +1772,8 @@
     *             If {@code c} or {@code separator} were {@code null}.
     */
    public static String joinCollection(Collection<?> c, String separator) {
        Validator.ensureNotNull(c, separator);
        Reject.ifNull(c);
        Reject.ifNull(separator);
        switch (c.size()) {
        case 0:
@@ -2053,7 +2055,8 @@
     * @return The updated {@code StringBuilder}.
     */
    public static StringBuilder toLowerCase(final ByteSequence b, final StringBuilder builder) {
        Validator.ensureNotNull(b, builder);
        Reject.ifNull(b);
        Reject.ifNull(builder);
        // FIXME: What locale should we use for non-ASCII characters? I
        // think we should use default to the Unicode StringPrep.
@@ -2090,7 +2093,7 @@
     * @return The lower-case representation of the given string.
     */
    public static String toLowerCase(final String s) {
        Validator.ensureNotNull(s);
        Reject.ifNull(s);
        // FIXME: What locale should we use for non-ASCII characters? I
        // think we should use default to the Unicode StringPrep.
@@ -2155,7 +2158,8 @@
     * @return The updated {@code StringBuilder}.
     */
    public static StringBuilder toLowerCase(final String s, final StringBuilder builder) {
        Validator.ensureNotNull(s, builder);
        Reject.ifNull(s);
        Reject.ifNull(builder);
        // FIXME: What locale should we use for non-ASCII characters? I
        // think we should use default to the Unicode StringPrep.
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java
@@ -25,7 +25,6 @@
 */
package com.forgerock.opendj.util;
import static com.forgerock.opendj.util.Validator.ensureNotNull;
import java.text.Normalizer;
import java.text.Normalizer.Form;
@@ -33,6 +32,7 @@
import java.util.HashSet;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.util.Reject;
/**
 * This class defines the "stringprep" profile as defined in RFC 4518. It must
@@ -452,8 +452,9 @@
     */
    public static void prepareUnicode(final StringBuilder buffer, final ByteSequence sequence,
            final boolean trim, final boolean foldCase) {
        ensureNotNull(buffer);
        ensureNotNull(sequence);
        Reject.ifNull(buffer);
        Reject.ifNull(sequence);
        // Optimize in the case of purely ascii characters which is the most
        // common case.
        final int length = sequence.length();
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/SubstringReader.java
@@ -27,6 +27,8 @@
package com.forgerock.opendj.util;
import org.forgerock.util.Reject;
/**
 * A sub-string reader.
 */
@@ -47,7 +49,7 @@
     *            the source of the reader.
     */
    public SubstringReader(final String s) {
        Validator.ensureNotNull(s);
        Reject.ifNull(s);
        source = s;
        length = s.length();
        pos = 0;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/Validator.java
File was deleted
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java
@@ -39,10 +39,10 @@
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.SubstringReader;
import com.forgerock.opendj.util.Validator;
/**
 * An attribute value assertion (AVA) as defined in RFC 4512 section 2.3
@@ -607,7 +607,8 @@
     *             {@code null}.
     */
    public AVA(final AttributeType attributeType, final Object attributeValue) {
        Validator.ensureNotNull(attributeType, attributeValue);
        Reject.ifNull(attributeType);
        Reject.ifNull(attributeValue);
        this.attributeType = attributeType;
        this.attributeValue = ByteString.valueOf(attributeValue);
@@ -631,7 +632,8 @@
     *             {@code null}.
     */
    public AVA(final String attributeType, final Object attributeValue) {
        Validator.ensureNotNull(attributeType, attributeValue);
        Reject.ifNull(attributeType);
        Reject.ifNull(attributeValue);
        this.attributeType = Schema.getDefaultSchema().getAttributeType(attributeType);
        this.attributeValue = ByteString.valueOf(attributeValue);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractAttribute.java
@@ -36,7 +36,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class provides a skeletal implementation of the {@code Attribute}
@@ -165,7 +165,7 @@
     * {@inheritDoc}
     */
    public boolean add(final Object... values) {
        Validator.ensureNotNull(values);
        Reject.ifNull(values);
        boolean modified = false;
        for (final Object value : values) {
            modified |= add(ByteString.valueOf(value));
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java
@@ -31,7 +31,6 @@
import static com.forgerock.opendj.ldap.CoreMessages.ERR_UNEXPECTED_SEARCH_RESULT_ENTRIES;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_UNEXPECTED_SEARCH_RESULT_ENTRIES_NO_COUNT;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_UNEXPECTED_SEARCH_RESULT_REFERENCES;
import static org.forgerock.opendj.ldap.ErrorResultException.newErrorResult;
import java.util.Collection;
@@ -56,8 +55,7 @@
import org.forgerock.opendj.ldif.ChangeRecord;
import org.forgerock.opendj.ldif.ChangeRecordVisitor;
import org.forgerock.opendj.ldif.ConnectionEntryReader;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class provides a skeletal implementation of the {@code Connection}
@@ -499,7 +497,8 @@
    public Result search(final SearchRequest request,
            final Collection<? super SearchResultEntry> entries,
            final Collection<? super SearchResultReference> references) throws ErrorResultException {
        Validator.ensureNotNull(request, entries);
        Reject.ifNull(request);
        Reject.ifNull(entries);
        // FIXME: does this need to be thread safe?
        final SearchResultHandler handler = new SearchResultHandler() {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnectionWrapper.java
@@ -49,7 +49,7 @@
import org.forgerock.opendj.ldif.ChangeRecord;
import org.forgerock.opendj.ldif.ConnectionEntryReader;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An abstract base class from which connection wrappers may be easily
@@ -72,7 +72,7 @@
     *            The connection to be wrapped.
     */
    protected AbstractConnectionWrapper(final C connection) {
        Validator.ensureNotNull(connection);
        Reject.ifNull(connection);
        this.connection = connection;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractEntry.java
@@ -32,7 +32,7 @@
import com.forgerock.opendj.util.Iterables;
import com.forgerock.opendj.util.Predicate;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class provides a skeletal implementation of the {@code Entry} interface,
@@ -125,7 +125,7 @@
    @Override
    public Iterable<Attribute> getAllAttributes(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        return Iterables.filteredIterable(getAllAttributes(), FIND_ATTRIBUTES_PREDICATE,
                attributeDescription);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java
@@ -38,9 +38,11 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.AsynchronousFutureResult;
import com.forgerock.opendj.util.ReferenceCountedObject;
import com.forgerock.opendj.util.Validator;
/**
 * An abstract load balancing algorithm providing monitoring and failover
@@ -280,7 +282,8 @@
    AbstractLoadBalancingAlgorithm(final Collection<? extends ConnectionFactory> factories,
            final LoadBalancerEventListener listener, final long interval, final TimeUnit unit,
            final ScheduledExecutorService scheduler) {
        Validator.ensureNotNull(factories, unit);
        Reject.ifNull(factories);
        Reject.ifNull(unit);
        this.monitoredFactories = new ArrayList<MonitoredConnectionFactory>(factories.size());
        int i = 0;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractMapEntry.java
@@ -30,7 +30,7 @@
import java.util.Collection;
import java.util.Map;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Abstract implementation for {@code Map} based entries.
@@ -157,7 +157,7 @@
     */
    @Override
    public final Entry setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
@@ -45,10 +45,10 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.ASCIICharProp;
import com.forgerock.opendj.util.Iterators;
import com.forgerock.opendj.util.Validator;
/**
 * An attribute description as defined in RFC 4512 section 2.5. Attribute
@@ -388,7 +388,7 @@
     *             {@code null}.
     */
    public AttributeDescription withOption(final String option) {
        Validator.ensureNotNull(option);
        Reject.ifNull(option);
        final String normalizedOption = toLowerCase(option);
        if (pimpl.hasOption(normalizedOption)) {
@@ -477,7 +477,7 @@
     *             {@code null}.
     */
    public AttributeDescription withoutOption(final String option) {
        Validator.ensureNotNull(option);
        Reject.ifNull(option);
        final String normalizedOption = toLowerCase(option);
        if (!pimpl.hasOption(normalizedOption)) {
@@ -555,7 +555,7 @@
     *             If {@code attributeType} was {@code null}.
     */
    public static AttributeDescription create(final AttributeType attributeType) {
        Validator.ensureNotNull(attributeType);
        Reject.ifNull(attributeType);
        // Use object identity in case attribute type does not come from
        // core schema.
@@ -580,7 +580,8 @@
     *             If {@code attributeType} or {@code option} was {@code null}.
     */
    public static AttributeDescription create(final AttributeType attributeType, final String option) {
        Validator.ensureNotNull(attributeType, option);
        Reject.ifNull(attributeType);
        Reject.ifNull(option);
        final String oid = attributeType.getNameOrOID();
        final StringBuilder builder = new StringBuilder(oid.length() + option.length() + 1);
@@ -608,7 +609,8 @@
     */
    public static AttributeDescription create(final AttributeType attributeType,
            final String... options) {
        Validator.ensureNotNull(attributeType, options);
        Reject.ifNull(attributeType);
        Reject.ifNull(options);
        switch (options.length) {
        case 0:
@@ -695,7 +697,8 @@
    @SuppressWarnings("serial")
    public static AttributeDescription valueOf(final String attributeDescription,
            final Schema schema) {
        Validator.ensureNotNull(attributeDescription, schema);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(schema);
        // First look up the attribute description in the cache.
        final WeakHashMap<Schema, Map<String, AttributeDescription>> threadLocalMap = CACHE.get();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java
@@ -31,9 +31,9 @@
import java.util.Iterator;
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.Iterators;
import com.forgerock.opendj.util.Validator;
/**
 * This class contains methods for creating and manipulating attributes.
@@ -495,7 +495,8 @@
     */
    public static final Attribute renameAttribute(final Attribute attribute,
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attribute, attributeDescription);
        Reject.ifNull(attribute);
        Reject.ifNull(attributeDescription);
        // Optimize for the case where no renaming is required.
        if (attribute.getAttributeDescription() == attributeDescription) {
@@ -525,7 +526,8 @@
     */
    public static final Attribute renameAttribute(final Attribute attribute,
            final String attributeDescription) {
        Validator.ensureNotNull(attribute, attributeDescription);
        Reject.ifNull(attribute);
        Reject.ifNull(attributeDescription);
        return renameAttribute(attribute, AttributeDescription.valueOf(attributeDescription));
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Base64.java
@@ -26,7 +26,7 @@
 */
package org.forgerock.opendj.ldap;
import static com.forgerock.opendj.util.Validator.ensureNotNull;
import org.forgerock.util.Reject;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_BASE64_DECODE_INVALID_CHARACTER;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_BASE64_DECODE_INVALID_LENGTH;
@@ -64,7 +64,7 @@
     *             If {@code base64} was {@code null}.
     */
    static ByteString decode(final String base64) {
        ensureNotNull(base64);
        Reject.ifNull(base64);
        // The encoded value must have length that is a multiple of four
        // bytes.
@@ -318,7 +318,7 @@
     *             If {@code bytes} was {@code null}.
     */
    static String encode(final ByteSequence bytes) {
        ensureNotNull(bytes);
        Reject.ifNull(bytes);
        final StringBuilder buffer = new StringBuilder(4 * bytes.length() / 3);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/CachedConnectionPool.java
@@ -44,6 +44,7 @@
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.forgerock.opendj.ldap.requests.AbandonRequest;
import org.forgerock.opendj.ldap.requests.AddRequest;
import org.forgerock.opendj.ldap.requests.BindRequest;
@@ -63,12 +64,12 @@
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import org.forgerock.opendj.ldif.ChangeRecord;
import org.forgerock.opendj.ldif.ConnectionEntryReader;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.AsynchronousFutureResult;
import com.forgerock.opendj.util.CompletedFutureResult;
import com.forgerock.opendj.util.ReferenceCountedObject;
import com.forgerock.opendj.util.TimeSource;
import com.forgerock.opendj.util.Validator;
/**
 * A connection pool implementation which maintains a cache of pooled
@@ -160,7 +161,7 @@
        @Override
        public void addConnectionEventListener(final ConnectionEventListener listener) {
            Validator.ensureNotNull(listener);
            Reject.ifNull(listener);
            final boolean notifyClose;
            final boolean notifyErrorOccurred;
            synchronized (stateLock) {
@@ -443,7 +444,7 @@
        @Override
        public void removeConnectionEventListener(final ConnectionEventListener listener) {
            Validator.ensureNotNull(listener);
            Reject.ifNull(listener);
            synchronized (stateLock) {
                if (listeners != null) {
                    listeners.remove(listener);
@@ -666,12 +667,12 @@
    CachedConnectionPool(final ConnectionFactory factory, final int corePoolSize,
            final int maximumPoolSize, final long idleTimeout, final TimeUnit unit,
            final ScheduledExecutorService scheduler) {
        Validator.ensureNotNull(factory);
        Validator.ensureTrue(corePoolSize >= 0, "corePoolSize < 0");
        Validator.ensureTrue(maximumPoolSize > 0, "maxPoolSize <= 0");
        Validator.ensureTrue(corePoolSize <= maximumPoolSize, "corePoolSize > maxPoolSize");
        Validator.ensureTrue(idleTimeout >= 0, "idleTimeout < 0");
        Validator.ensureTrue(idleTimeout == 0 || unit != null, "time unit is null");
        Reject.ifNull(factory);
        Reject.ifFalse(corePoolSize >= 0, "corePoolSize < 0");
        Reject.ifFalse(maximumPoolSize > 0, "maxPoolSize <= 0");
        Reject.ifFalse(corePoolSize <= maximumPoolSize, "corePoolSize > maxPoolSize");
        Reject.ifFalse(idleTimeout >= 0, "idleTimeout < 0");
        Reject.ifFalse(idleTimeout == 0 || unit != null, "time unit is null");
        this.factory = factory;
        this.corePoolSize = corePoolSize;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java
@@ -34,8 +34,7 @@
import org.forgerock.opendj.ldap.requests.BindRequest;
import org.forgerock.opendj.ldap.requests.SearchRequest;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class contains methods for creating and manipulating connection
@@ -66,7 +65,8 @@
     */
    public static ConnectionFactory newAuthenticatedConnectionFactory(
            final ConnectionFactory factory, final BindRequest request) {
        Validator.ensureNotNull(factory, request);
        Reject.ifNull(factory);
        Reject.ifNull(request);
        return new AuthenticatedConnectionFactory(factory, request);
    }
@@ -371,7 +371,7 @@
     */
    public static Connection newInternalConnection(
            final RequestHandler<RequestContext> requestHandler) {
        Validator.ensureNotNull(requestHandler);
        Reject.ifNull(requestHandler);
        return newInternalConnection(adaptRequestHandler(requestHandler));
    }
@@ -398,7 +398,7 @@
     *             If {@code serverConnection} was {@code null}.
     */
    public static Connection newInternalConnection(final ServerConnection<Integer> serverConnection) {
        Validator.ensureNotNull(serverConnection);
        Reject.ifNull(serverConnection);
        return new InternalConnection(serverConnection);
    }
@@ -427,7 +427,7 @@
     */
    public static ConnectionFactory newInternalConnectionFactory(
            final RequestHandler<RequestContext> requestHandler) {
        Validator.ensureNotNull(requestHandler);
        Reject.ifNull(requestHandler);
        return new InternalConnectionFactory<Void>(Connections
                .<Void> newServerConnectionFactory(requestHandler), null);
    }
@@ -461,7 +461,7 @@
     */
    public static <C> ConnectionFactory newInternalConnectionFactory(
            final RequestHandlerFactory<C, RequestContext> factory, final C clientContext) {
        Validator.ensureNotNull(factory);
        Reject.ifNull(factory);
        return new InternalConnectionFactory<C>(newServerConnectionFactory(factory), clientContext);
    }
@@ -494,7 +494,7 @@
     */
    public static <C> ConnectionFactory newInternalConnectionFactory(
            final ServerConnectionFactory<C, Integer> factory, final C clientContext) {
        Validator.ensureNotNull(factory);
        Reject.ifNull(factory);
        return new InternalConnectionFactory<C>(factory, clientContext);
    }
@@ -531,7 +531,8 @@
     */
    public static ConnectionFactory newNamedConnectionFactory(final ConnectionFactory factory,
            final String name) {
        Validator.ensureNotNull(factory, name);
        Reject.ifNull(factory);
        Reject.ifNull(name);
        return new ConnectionFactory() {
@@ -585,7 +586,7 @@
     */
    public static <C> ServerConnectionFactory<C, Integer> newServerConnectionFactory(
            final RequestHandler<RequestContext> requestHandler) {
        Validator.ensureNotNull(requestHandler);
        Reject.ifNull(requestHandler);
        return new RequestHandlerFactoryAdapter<C>(new RequestHandlerFactory<C, RequestContext>() {
            @Override
            public RequestHandler<RequestContext> handleAccept(final C clientContext) {
@@ -620,7 +621,7 @@
     */
    public static <C> ServerConnectionFactory<C, Integer> newServerConnectionFactory(
            final RequestHandlerFactory<C, RequestContext> factory) {
        Validator.ensureNotNull(factory);
        Reject.ifNull(factory);
        return new RequestHandlerFactoryAdapter<C>(factory);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
@@ -43,10 +43,10 @@
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.SubstringReader;
import com.forgerock.opendj.util.Validator;
/**
 * A distinguished name (DN) as defined in RFC 4512 section 2.3 is the
@@ -117,7 +117,7 @@
     *         string.
     */
    public static String escapeAttributeValue(final Object attributeValue) {
        Validator.ensureNotNull(attributeValue);
        Reject.ifNull(attributeValue);
        final String s = String.valueOf(attributeValue);
        final StringBuilder builder = new StringBuilder(s.length());
        AVA.escapeAttributeValue(s, builder);
@@ -237,7 +237,8 @@
     * @see #format(String, Schema, Object...)
     */
    public static DN valueOf(final String dn, final Schema schema) {
        Validator.ensureNotNull(dn, schema);
        Reject.ifNull(dn);
        Reject.ifNull(schema);
        if (dn.length() == 0) {
            return ROOT_DN;
        }
@@ -396,7 +397,7 @@
     *             If {@code dn} was {@code null}.
     */
    public DN child(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        if (dn.isRootDN()) {
            return this;
@@ -433,7 +434,7 @@
     * @see RDN#maxValue()
     */
    public DN child(final RDN rdn) {
        Validator.ensureNotNull(rdn);
        Reject.ifNull(rdn);
        return new DN(this, rdn, null);
    }
@@ -452,7 +453,7 @@
     *             If {@code dn} was {@code null}.
     */
    public DN child(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        return child(valueOf(dn));
    }
@@ -785,7 +786,7 @@
     *             If {@code index} is less than zero.
     */
    public DN localName(final int index) {
        Validator.ensureTrue(index >= 0, "index less than zero");
        Reject.ifFalse(index >= 0, "index less than zero");
        if (index == 0) {
            return ROOT_DN;
@@ -838,7 +839,7 @@
    public DN parent(final int index) {
        // We allow size + 1 so that we can return null as the parent of the
        // Root DN.
        Validator.ensureTrue(index >= 0, "index less than zero");
        Reject.ifFalse(index >= 0, "index less than zero");
        DN parentDN = this;
        for (int i = 0; parentDN != null && i < index; i++) {
@@ -871,7 +872,8 @@
     *             If {@code fromDN} or {@code toDN} was {@code null}.
     */
    public DN rename(final DN fromDN, final DN toDN) {
        Validator.ensureNotNull(fromDN, toDN);
        Reject.ifNull(fromDN);
        Reject.ifNull(toDN);
        if (!isSubordinateOrEqualTo(fromDN)) {
            return this;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DecodeOptions.java
@@ -29,7 +29,7 @@
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Decode options allow applications to control how requests and responses are
@@ -136,7 +136,7 @@
     *             If {@code factory} was {@code null}.
     */
    public final DecodeOptions setAttributeFactory(final AttributeFactory factory) {
        Validator.ensureNotNull(factory);
        Reject.ifNull(factory);
        this.attributeFactory = factory;
        return this;
    }
@@ -153,7 +153,7 @@
     *             If {@code factory} was {@code null}.
     */
    public final DecodeOptions setEntryFactory(final EntryFactory factory) {
        Validator.ensureNotNull(factory);
        Reject.ifNull(factory);
        this.entryFactory = factory;
        return this;
    }
@@ -171,7 +171,7 @@
     *             If {@code schema} was {@code null}.
     */
    public final DecodeOptions setSchema(final Schema schema) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        this.schemaResolver = new FixedSchemaResolver(schema);
        return this;
    }
@@ -189,7 +189,7 @@
     *             If {@code resolver} was {@code null}.
     */
    public final DecodeOptions setSchemaResolver(final SchemaResolver resolver) {
        Validator.ensureNotNull(resolver);
        Reject.ifNull(resolver);
        this.schemaResolver = resolver;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
@@ -28,12 +28,7 @@
package org.forgerock.opendj.ldap;
import static org.forgerock.opendj.ldap.AttributeDescription.objectClass;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_ENTRY_DUPLICATE_VALUES;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_ENTRY_INCREMENT_CANNOT_PARSE_AS_INT;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_ENTRY_INCREMENT_INVALID_VALUE_COUNT;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_ENTRY_INCREMENT_NO_SUCH_ATTRIBUTE;
import static com.forgerock.opendj.ldap.CoreMessages.*;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_ENTRY_UNKNOWN_MODIFICATION_TYPE;
import static org.forgerock.opendj.ldap.ErrorResultException.newErrorResult;
import java.util.ArrayList;
@@ -53,9 +48,9 @@
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.SchemaValidationPolicy;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.Iterables;
import com.forgerock.opendj.util.Validator;
/**
 * This class contains methods for creating and manipulating entries.
@@ -434,7 +429,8 @@
     * @see Requests#newModifyRequest(Entry, Entry)
     */
    public static ModifyRequest diffEntries(final Entry fromEntry, final Entry toEntry) {
        Validator.ensureNotNull(fromEntry, toEntry);
        Reject.ifNull(fromEntry);
        Reject.ifNull(toEntry);
        final ModifyRequest request = Requests.newModifyRequest(fromEntry.getName());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/ErrorResultIOException.java
@@ -29,7 +29,7 @@
import java.io.IOException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An {@code ErrorResultIOException} adapts an {@code ErrorResultException} to
@@ -49,7 +49,7 @@
     *             If {@code cause} was {@code null}.
     */
    public ErrorResultIOException(final ErrorResultException cause) {
        super(Validator.ensureNotNull(cause));
        super(Reject.checkNotNull(cause));
        this.cause = cause;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java
@@ -41,9 +41,9 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * A search filter as defined in RFC 4511. In addition this class also provides
@@ -469,12 +469,12 @@
            return alwaysTrue();
        } else if (subFilters.size() == 1) {
            final Filter subFilter = subFilters.iterator().next();
            Validator.ensureNotNull(subFilter);
            Reject.ifNull(subFilter);
            return new Filter(new AndImpl(Collections.singletonList(subFilter)));
        } else {
            final List<Filter> subFiltersList = new ArrayList<Filter>(subFilters.size());
            for (final Filter subFilter : subFilters) {
                Validator.ensureNotNull(subFilter);
                Reject.ifNull(subFilter);
                subFiltersList.add(subFilter);
            }
            return new Filter(new AndImpl(Collections.unmodifiableList(subFiltersList)));
@@ -496,12 +496,12 @@
            // RFC 4526 - TRUE filter.
            return alwaysTrue();
        } else if (subFilters.length == 1) {
            Validator.ensureNotNull(subFilters[0]);
            Reject.ifNull(subFilters[0]);
            return new Filter(new AndImpl(Collections.singletonList(subFilters[0])));
        } else {
            final List<Filter> subFiltersList = new ArrayList<Filter>(subFilters.length);
            for (final Filter subFilter : subFilters) {
                Validator.ensureNotNull(subFilter);
                Reject.ifNull(subFilter);
                subFiltersList.add(subFilter);
            }
            return new Filter(new AndImpl(Collections.unmodifiableList(subFiltersList)));
@@ -522,7 +522,8 @@
     * @return The newly created {@code approximate match} filter.
     */
    public static Filter approx(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new Filter(new ApproxMatchImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
    }
@@ -541,7 +542,8 @@
     * @return The newly created {@code equality match} filter.
     */
    public static Filter equality(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new Filter(new EqualityMatchImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
    }
@@ -583,7 +585,7 @@
     * @see #format(String, Object...)
     */
    public static String escapeAssertionValue(final Object assertionValue) {
        Validator.ensureNotNull(assertionValue);
        Reject.ifNull(assertionValue);
        final ByteString bytes = ByteString.valueOf(assertionValue);
        final StringBuilder builder = new StringBuilder(bytes.length());
        valueToFilterString(builder, bytes);
@@ -610,9 +612,9 @@
     */
    public static Filter extensible(final String matchingRule, final String attributeDescription,
            final Object assertionValue, final boolean dnAttributes) {
        Validator.ensureTrue((matchingRule != null) || (attributeDescription != null),
                "matchingRule and/or " + "attributeDescription must not be null");
        Validator.ensureNotNull(assertionValue);
        Reject.ifFalse(matchingRule != null || attributeDescription != null,
                "matchingRule and/or attributeDescription must not be null");
        Reject.ifNull(assertionValue);
        return new Filter(new ExtensibleMatchImpl(matchingRule, attributeDescription, ByteString
                .valueOf(assertionValue), dnAttributes));
    }
@@ -632,7 +634,8 @@
     */
    public static Filter greaterOrEqual(final String attributeDescription,
            final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new Filter(new GreaterOrEqualImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
    }
@@ -676,7 +679,8 @@
     * @return The newly created {@code less or equal} filter.
     */
    public static Filter lessOrEqual(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new Filter(new LessOrEqualImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
    }
@@ -714,7 +718,7 @@
     * @return The newly created {@code not} filter.
     */
    public static Filter not(final Filter subFilter) {
        Validator.ensureNotNull(subFilter);
        Reject.ifNull(subFilter);
        return new Filter(new NotImpl(subFilter));
    }
@@ -750,12 +754,12 @@
            return alwaysFalse();
        } else if (subFilters.size() == 1) {
            final Filter subFilter = subFilters.iterator().next();
            Validator.ensureNotNull(subFilter);
            Reject.ifNull(subFilter);
            return new Filter(new OrImpl(Collections.singletonList(subFilter)));
        } else {
            final List<Filter> subFiltersList = new ArrayList<Filter>(subFilters.size());
            for (final Filter subFilter : subFilters) {
                Validator.ensureNotNull(subFilter);
                Reject.ifNull(subFilter);
                subFiltersList.add(subFilter);
            }
            return new Filter(new OrImpl(Collections.unmodifiableList(subFiltersList)));
@@ -777,12 +781,12 @@
            // RFC 4526 - FALSE filter.
            return alwaysFalse();
        } else if (subFilters.length == 1) {
            Validator.ensureNotNull(subFilters[0]);
            Reject.ifNull(subFilters[0]);
            return new Filter(new OrImpl(Collections.singletonList(subFilters[0])));
        } else {
            final List<Filter> subFiltersList = new ArrayList<Filter>(subFilters.length);
            for (final Filter subFilter : subFilters) {
                Validator.ensureNotNull(subFilter);
                Reject.ifNull(subFilter);
                subFiltersList.add(subFilter);
            }
            return new Filter(new OrImpl(Collections.unmodifiableList(subFiltersList)));
@@ -798,7 +802,7 @@
     * @return The newly created {@code present} filter.
     */
    public static Filter present(final String attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        if (toLowerCase(attributeDescription).equals("objectclass")) {
            return OBJECT_CLASS_PRESENT;
        }
@@ -830,8 +834,8 @@
    public static Filter substrings(final String attributeDescription,
            final Object initialSubstring, final Collection<?> anySubstrings,
            final Object finalSubstring) {
        Validator.ensureNotNull(attributeDescription);
        Validator.ensureTrue((initialSubstring != null) || (finalSubstring != null)
        Reject.ifNull(attributeDescription);
        Reject.ifFalse((initialSubstring != null) || (finalSubstring != null)
                || ((anySubstrings != null) && (anySubstrings.size() > 0)),
                "at least one substring (initial, any or final)" + " must be specified");
@@ -840,12 +844,12 @@
            anySubstringList = Collections.emptyList();
        } else if (anySubstrings.size() == 1) {
            final Object anySubstring = anySubstrings.iterator().next();
            Validator.ensureNotNull(anySubstring);
            Reject.ifNull(anySubstring);
            anySubstringList = Collections.singletonList(ByteString.valueOf(anySubstring));
        } else {
            anySubstringList = new ArrayList<ByteString>(anySubstrings.size());
            for (final Object anySubstring : anySubstrings) {
                Validator.ensureNotNull(anySubstring);
                Reject.ifNull(anySubstring);
                anySubstringList.add(ByteString.valueOf(anySubstring));
            }
@@ -870,7 +874,7 @@
     * @return The newly created {@code unrecognized} filter.
     */
    public static Filter unrecognized(final byte filterTag, final ByteString filterBytes) {
        Validator.ensureNotNull(filterBytes);
        Reject.ifNull(filterBytes);
        return new Filter(new UnrecognizedImpl(filterTag, filterBytes));
    }
@@ -887,7 +891,7 @@
     * @see #format(String, Object...)
     */
    public static Filter valueOf(final String string) {
        Validator.ensureNotNull(string);
        Reject.ifNull(string);
        // If the filter is enclosed in a pair of single quotes it
        // is invalid (issue #1024).
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/GeneralizedTime.java
@@ -46,8 +46,7 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDAP generalized time as defined in RFC 4517. This class facilitates
@@ -91,7 +90,7 @@
     * @return A generalized time representing the provided {@code Calendar}.
     */
    public static GeneralizedTime valueOf(final Calendar calendar) {
        Validator.ensureNotNull(calendar);
        Reject.ifNull(calendar);
        return new GeneralizedTime((Calendar) calendar.clone(), null, -1L, null);
    }
@@ -106,7 +105,7 @@
     * @return A generalized time representing the provided {@code Date}.
     */
    public static GeneralizedTime valueOf(final Date date) {
        Validator.ensureNotNull(date);
        Reject.ifNull(date);
        return new GeneralizedTime(null, (Date) date.clone(), -1L, null);
    }
@@ -120,7 +119,7 @@
     *         since the epoch.
     */
    public static GeneralizedTime valueOf(final long timeMS) {
        Validator.ensureTrue(timeMS >= 0, "timeMS must be >= 0");
        Reject.ifFalse(timeMS >= 0, "timeMS must be >= 0");
        return new GeneralizedTime(null, null, timeMS, null);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java
@@ -46,6 +46,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import org.forgerock.opendj.ldap.requests.AbandonRequest;
import org.forgerock.opendj.ldap.requests.AddRequest;
import org.forgerock.opendj.ldap.requests.BindRequest;
@@ -65,6 +66,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultEntry;
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import org.forgerock.opendj.ldap.spi.ConnectionState;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.AsynchronousFutureResult;
import com.forgerock.opendj.util.CompletedFutureResult;
@@ -72,7 +74,6 @@
import com.forgerock.opendj.util.RecursiveFutureResult;
import com.forgerock.opendj.util.ReferenceCountedObject;
import com.forgerock.opendj.util.TimeSource;
import com.forgerock.opendj.util.Validator;
/**
 * An heart beat connection factory can be used to create connections that sends
@@ -1173,9 +1174,10 @@
    HeartBeatConnectionFactory(final ConnectionFactory factory, final long interval,
            final long timeout, final TimeUnit unit, final SearchRequest heartBeat,
            final ScheduledExecutorService scheduler) {
        Validator.ensureNotNull(factory, unit);
        Validator.ensureTrue(interval >= 0, "negative interval");
        Validator.ensureTrue(timeout >= 0, "negative timeout");
        Reject.ifNull(factory);
        Reject.ifNull(unit);
        Reject.ifFalse(interval >= 0, "negative interval");
        Reject.ifFalse(timeout >= 0, "negative timeout");
        this.heartBeatRequest = heartBeat != null ? heartBeat : DEFAULT_SEARCH;
        this.interval = interval;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/InternalConnection.java
@@ -53,7 +53,7 @@
import org.forgerock.opendj.ldap.spi.LDAPSearchFutureResultImpl;
import com.forgerock.opendj.util.CompletedFutureResult;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a pseudo-connection object that can be used for performing
@@ -140,7 +140,7 @@
     */
    @Override
    public void addConnectionEventListener(final ConnectionEventListener listener) {
        Validator.ensureNotNull(listener);
        Reject.ifNull(listener);
        listeners.add(listener);
    }
@@ -267,7 +267,7 @@
     */
    @Override
    public void removeConnectionEventListener(final ConnectionEventListener listener) {
        Validator.ensureNotNull(listener);
        Reject.ifNull(listener);
        listeners.remove(listener);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java
@@ -44,7 +44,7 @@
import javax.net.ssl.X509ExtendedKeyManager;
import javax.net.ssl.X509KeyManager;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class contains methods for creating common types of key manager.
@@ -219,7 +219,7 @@
     */
    public static X509KeyManager useKeyStoreFile(final String file, final char[] password,
            final String format) throws GeneralSecurityException, IOException {
        Validator.ensureNotNull(file);
        Reject.ifNull(file);
        final File keyStoreFile = new File(file);
        final String keyStoreFormat = format != null ? format : KeyStore.getDefaultType();
@@ -312,7 +312,8 @@
     */
    public static X509KeyManager useSingleCertificate(final String alias,
            final X509KeyManager keyManager) {
        Validator.ensureNotNull(alias, keyManager);
        Reject.ifNull(alias);
        Reject.ifNull(keyManager);
        return new SelectCertificate(keyManager, alias);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java
@@ -35,8 +35,7 @@
import org.forgerock.opendj.ldap.spi.LDAPConnectionFactoryImpl;
import org.forgerock.opendj.ldap.spi.TransportProvider;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A factory class which can be used to obtain connections to an LDAP Directory
@@ -83,7 +82,8 @@
     *             provider requested using options is not found.
     */
    public LDAPConnectionFactory(final SocketAddress address, final LDAPOptions options) {
        Validator.ensureNotNull(address, options);
        Reject.ifNull(address);
        Reject.ifNull(options);
        this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
                options.getProviderClassLoader());
        this.impl = provider.getLDAPConnectionFactory(address, options);
@@ -124,7 +124,8 @@
     *             provider requested using options is not found.
     */
    public LDAPConnectionFactory(final String host, final int port, final LDAPOptions options) {
        Validator.ensureNotNull(host, options);
        Reject.ifNull(host);
        Reject.ifNull(options);
        final SocketAddress address = new InetSocketAddress(host, port);
        this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
                options.getProviderClassLoader());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java
@@ -34,10 +34,10 @@
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import org.forgerock.opendj.ldap.spi.LDAPListenerImpl;
import org.forgerock.opendj.ldap.spi.TransportProvider;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDAP server connection listener which waits for LDAP connection requests
@@ -144,7 +144,8 @@
    public LDAPListener(final int port,
            final ServerConnectionFactory<LDAPClientContext, Integer> factory,
            final LDAPListenerOptions options) throws IOException {
        Validator.ensureNotNull(factory, options);
        Reject.ifNull(factory);
        Reject.ifNull(options);
        final SocketAddress address = new InetSocketAddress(port);
        this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
                options.getProviderClassLoader());
@@ -192,7 +193,9 @@
    public LDAPListener(final SocketAddress address,
            final ServerConnectionFactory<LDAPClientContext, Integer> factory,
            final LDAPListenerOptions options) throws IOException {
        Validator.ensureNotNull(address, factory, options);
        Reject.ifNull(address);
        Reject.ifNull(factory);
        Reject.ifNull(options);
        this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
                options.getProviderClassLoader());
        this.impl = provider.getLDAPListener(address, factory, options);
@@ -243,7 +246,9 @@
    public LDAPListener(final String host, final int port,
            final ServerConnectionFactory<LDAPClientContext, Integer> factory,
            final LDAPListenerOptions options) throws IOException {
        Validator.ensureNotNull(host, factory, options);
        Reject.ifNull(host);
        Reject.ifNull(factory);
        Reject.ifNull(options);
        final SocketAddress address = new InetSocketAddress(host, port);
        this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
                options.getProviderClassLoader());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListenerOptions.java
@@ -27,7 +27,7 @@
package org.forgerock.opendj.ldap;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Common options for LDAP listeners.
@@ -125,7 +125,7 @@
     *             If {@code decodeOptions} was {@code null}.
     */
    public LDAPListenerOptions setDecodeOptions(final DecodeOptions decodeOptions) {
        Validator.ensureNotNull(decodeOptions);
        Reject.ifNull(decodeOptions);
        this.decodeOptions = decodeOptions;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPOptions.java
@@ -33,7 +33,7 @@
import javax.net.ssl.SSLContext;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Common options for LDAP client connections.
@@ -141,7 +141,7 @@
     *             If {@code decodeOptions} was {@code null}.
     */
    public final LDAPOptions setDecodeOptions(final DecodeOptions decodeOptions) {
        Validator.ensureNotNull(decodeOptions);
        Reject.ifNull(decodeOptions);
        this.decodeOptions = decodeOptions;
        return this;
    }
@@ -229,7 +229,7 @@
     */
    public final LDAPOptions addEnabledProtocol(String... protocols) {
        for (final String protocol : protocols) {
            enabledProtocols.add(Validator.ensureNotNull(protocol));
            enabledProtocols.add(Reject.checkNotNull(protocol));
        }
        return this;
    }
@@ -249,7 +249,7 @@
     */
    public final LDAPOptions addEnabledCipherSuite(String... suites) {
        for (final String suite : suites) {
            enabledCipherSuites.add(Validator.ensureNotNull(suite));
            enabledCipherSuites.add(Reject.checkNotNull(suite));
        }
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java
@@ -42,9 +42,9 @@
import org.forgerock.opendj.ldap.requests.Requests;
import org.forgerock.opendj.ldap.requests.SearchRequest;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * An LDAP URL as defined in RFC 4516. In addition, the secure ldap (ldaps://)
@@ -266,7 +266,8 @@
     *             If {@code url} or {@code schema} was {@code null}.
     */
    public static LDAPUrl valueOf(final String url, final Schema schema) {
        Validator.ensureNotNull(url, schema);
        Reject.ifNull(url);
        Reject.ifNull(schema);
        return new LDAPUrl(url, schema);
    }
@@ -285,7 +286,8 @@
    private static void percentDecoder(final String urlString, final int index, final String s,
            final StringBuilder decoded) {
        Validator.ensureNotNull(s, decoded);
        Reject.ifNull(s);
        Reject.ifNull(decoded);
        decoded.append(s);
        int srcPos = 0, dstPos = 0;
@@ -318,7 +320,7 @@
     *            The buffer that contains the final percent encoded value.
     */
    private static void percentEncoder(final String urlElement, final StringBuilder encodedBuffer) {
        Validator.ensureNotNull(urlElement);
        Reject.ifNull(urlElement);
        for (int count = 0; count < urlElement.length(); count++) {
            final char c = urlElement.charAt(count);
            if (VALID_CHARS.contains(c)) {
@@ -735,7 +737,9 @@
    private int parseHostPort(final String urlString, final String hostAndPort,
            final StringBuilder host) {
        Validator.ensureNotNull(hostAndPort, port, host);
        Reject.ifNull(hostAndPort);
        Reject.ifNull((Object) port);
        Reject.ifNull(host);
        int urlPort = isSecured ? DEFAULT_SSL_PORT : DEFAULT_PORT;
        if (hostAndPort.length() == 0) {
            host.append(DEFAULT_HOST);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LinkedAttribute.java
@@ -37,7 +37,7 @@
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An implementation of the {@code Attribute} interface with predictable
@@ -498,7 +498,7 @@
     *             If {@code attributeDescription} was {@code null}.
     */
    public LinkedAttribute(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        this.attributeDescription = attributeDescription;
    }
@@ -658,7 +658,7 @@
     */
    @Override
    public boolean add(final ByteString value) {
        Validator.ensureNotNull(value);
        Reject.ifNull(value);
        return pimpl.add(this, value);
    }
@@ -675,7 +675,7 @@
     */
    @Override
    public boolean contains(final Object value) {
        Validator.ensureNotNull(value);
        Reject.ifNull(value);
        return pimpl.contains(this, ByteString.valueOf(value));
    }
@@ -684,7 +684,7 @@
     */
    @Override
    public boolean containsAll(final Collection<?> values) {
        Validator.ensureNotNull(values);
        Reject.ifNull(values);
        return pimpl.containsAll(this, values);
    }
@@ -717,7 +717,7 @@
     */
    @Override
    public boolean remove(final Object value) {
        Validator.ensureNotNull(value);
        Reject.ifNull(value);
        return pimpl.remove(this, ByteString.valueOf(value));
    }
@@ -727,7 +727,7 @@
    @Override
    public <T> boolean retainAll(final Collection<T> values,
            final Collection<? super T> missingValues) {
        Validator.ensureNotNull(values);
        Reject.ifNull(values);
        return pimpl.retainAll(this, values, missingValues);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LinkedHashMapEntry.java
@@ -32,7 +32,7 @@
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.requests.Requests;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An implementation of the {@code Entry} interface which uses a
@@ -113,7 +113,7 @@
     *             If {@code name} was {@code null}.
     */
    public LinkedHashMapEntry(final DN name) {
        super(Validator.ensureNotNull(name), new LinkedHashMap<AttributeDescription, Attribute>());
        super(Reject.checkNotNull(name), new LinkedHashMap<AttributeDescription, Attribute>());
    }
    /**
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancer.java
@@ -28,7 +28,7 @@
package org.forgerock.opendj.ldap;
import com.forgerock.opendj.util.CompletedFutureResult;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A load balancing connection factory allocates connections using the provided
@@ -38,7 +38,7 @@
    private final LoadBalancingAlgorithm algorithm;
    LoadBalancer(final LoadBalancingAlgorithm algorithm) {
        Validator.ensureNotNull(algorithm);
        Reject.ifNull(algorithm);
        this.algorithm = algorithm;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java
@@ -26,7 +26,7 @@
package org.forgerock.opendj.ldap;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A modification to be performed on an entry during a Modify operation.
@@ -53,7 +53,8 @@
     *            The the attribute containing the values to be modified.
     */
    public Modification(final ModificationType modificationType, final Attribute attribute) {
        Validator.ensureNotNull(modificationType, attribute);
        Reject.ifNull(modificationType);
        Reject.ifNull(attribute);
        this.modificationType = modificationType;
        this.attribute = attribute;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RDN.java
@@ -43,7 +43,7 @@
import com.forgerock.opendj.util.Iterators;
import com.forgerock.opendj.util.SubstringReader;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A relative distinguished name (RDN) as defined in RFC 4512 section 2.3 is the
@@ -243,7 +243,7 @@
    }
    private RDN(final AVA[] avas, final String stringValue) {
        Validator.ensureNotNull((Object[]) avas);
        Reject.ifNull(avas);
        this.avas = avas;
        this.stringValue = stringValue;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RequestHandlerFactoryAdapter.java
@@ -62,7 +62,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultEntry;
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An adapter which converts a {@code RequestHandlerFactory} into a
@@ -160,7 +160,7 @@
         */
        @Override
        public void addCancelRequestListener(final CancelRequestListener listener) {
            Validator.ensureNotNull(listener);
            Reject.ifNull(listener);
            boolean invokeImmediately = false;
            synchronized (stateLock) {
@@ -275,7 +275,7 @@
         */
        @Override
        public void removeCancelRequestListener(final CancelRequestListener listener) {
            Validator.ensureNotNull(listener);
            Reject.ifNull(listener);
            synchronized (stateLock) {
                if (cancelRequestListeners != null) {
@@ -287,7 +287,7 @@
        private <R extends ExtendedResult> void cancel(final LocalizableMessage reason,
                final ExtendedRequest<R> cancelRequest, final ResultHandler<R> cancelResultHandler,
                final boolean sendResult) {
            Validator.ensureNotNull(reason);
            Reject.ifNull(reason);
            if (!isCancelSupported) {
                if (cancelResultHandler != null) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RootDSE.java
@@ -37,7 +37,7 @@
import com.forgerock.opendj.util.Collections2;
import com.forgerock.opendj.util.FutureResultTransformer;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The root DSE is a DSA-specific Entry (DSE) and not part of any naming context
@@ -206,7 +206,7 @@
     *             If {@code entry} was {@code null} .
     */
    public static RootDSE valueOf(Entry entry) {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        return new RootDSE(entry);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/SearchResultReferenceIOException.java
@@ -31,7 +31,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Thrown when an iteration over a set of search results using a
@@ -52,7 +52,7 @@
     *             If {@code reference} was {@code null}.
     */
    public SearchResultReferenceIOException(final SearchResultReference reference) {
        super(Validator.ensureNotNull(reference).toString());
        super(Reject.checkNotNull(reference).toString());
        this.reference = reference;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java
@@ -40,8 +40,7 @@
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A search result sort key as defined in RFC 2891 is used to specify how search
@@ -192,8 +191,9 @@
     *             If {@code schema} or {@code keys} was {@code null}.
     */
    public static Comparator<Entry> comparator(final Schema schema, final Collection<SortKey> keys) {
        Validator.ensureNotNull(schema, keys);
        Validator.ensureTrue(!keys.isEmpty(), "keys must not be empty");
        Reject.ifNull(schema);
        Reject.ifNull(keys);
        Reject.ifFalse(!keys.isEmpty(), "keys must not be empty");
        final List<Comparator<Entry>> comparators = new ArrayList<Comparator<Entry>>(keys.size());
        for (final SortKey key : keys) {
@@ -263,7 +263,7 @@
     *             If {@code sortKeys} was {@code null}.
     */
    public static Comparator<Entry> comparator(final String sortKeys) {
        Validator.ensureNotNull(sortKeys);
        Reject.ifNull(sortKeys);
        final List<Comparator<Entry>> comparators = new LinkedList<Comparator<Entry>>();
        final StringTokenizer tokenizer = new StringTokenizer(sortKeys, ",");
@@ -308,7 +308,7 @@
     *             If {@code sortKey} was {@code null}.
     */
    public static final SortKey valueOf(String sortKey) {
        Validator.ensureNotNull(sortKey);
        Reject.ifNull(sortKey);
        boolean reverseOrder = false;
        if (sortKey.startsWith("-")) {
@@ -366,7 +366,7 @@
     */
    public SortKey(final AttributeDescription attributeDescription, final boolean isReverseOrder,
            final MatchingRule orderingMatchingRule) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        this.attributeDescription = attributeDescription.toString();
        this.orderingMatchingRule =
                orderingMatchingRule != null ? orderingMatchingRule.getNameOrOID() : null;
@@ -424,7 +424,7 @@
     */
    public SortKey(final String attributeDescription, final boolean isReverseOrder,
            final String orderingMatchingRule) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        this.attributeDescription = attributeDescription;
        this.orderingMatchingRule = orderingMatchingRule;
        this.isReverseOrder = isReverseOrder;
@@ -462,7 +462,7 @@
     *             If {@code schema} was {@code null}.
     */
    public Comparator<Entry> comparator(final Schema schema) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        final AttributeDescription ad = AttributeDescription.valueOf(attributeDescription, schema);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/TreeMapEntry.java
@@ -32,7 +32,7 @@
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.requests.Requests;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An implementation of the {@code Entry} interface which uses a {@code TreeMap}
@@ -115,7 +115,7 @@
     *             If {@code name} was {@code null}.
     */
    public TreeMapEntry(final DN name) {
        super(Validator.ensureNotNull(name), new TreeMap<AttributeDescription, Attribute>());
        super(Reject.checkNotNull(name), new TreeMap<AttributeDescription, Attribute>());
    }
    /**
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java
@@ -46,8 +46,7 @@
import javax.net.ssl.X509TrustManager;
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class contains methods for creating common types of trust manager.
@@ -291,7 +290,8 @@
     */
    public static X509TrustManager checkHostName(final String hostNamePattern,
            final X509TrustManager trustManager) {
        Validator.ensureNotNull(trustManager, hostNamePattern);
        Reject.ifNull(trustManager);
        Reject.ifNull(hostNamePattern);
        return new CheckHostName(trustManager, hostNamePattern);
    }
@@ -345,7 +345,7 @@
     */
    public static X509TrustManager checkUsingTrustStore(final String file, final char[] password,
            final String format) throws GeneralSecurityException, IOException {
        Validator.ensureNotNull(file);
        Reject.ifNull(file);
        final File trustStoreFile = new File(file);
        final String trustStoreFormat = format != null ? format : KeyStore.getDefaultType();
@@ -397,7 +397,7 @@
     *             If {@code trustManager} was {@code null}.
     */
    public static X509TrustManager checkValidityDates(final X509TrustManager trustManager) {
        Validator.ensureNotNull(trustManager);
        Reject.ifNull(trustManager);
        return new CheckValidatyDates(trustManager);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AssertionRequestControl.java
@@ -45,7 +45,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.Filter;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The assertion request control as defined in RFC 4528. The Assertion control
@@ -91,7 +91,7 @@
                public AssertionRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof AssertionRequestControl) {
                        return (AssertionRequestControl) control;
@@ -149,7 +149,7 @@
    // Prevent direct instantiation.
    private AssertionRequestControl(final boolean isCritical, final Filter filter) {
        Validator.ensureNotNull(filter);
        Reject.ifNull(filter);
        this.isCritical = isCritical;
        this.filter = filter;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AuthorizationIdentityRequestControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The authorization request control as defined in RFC 3829. The authorization
@@ -92,7 +92,7 @@
                public AuthorizationIdentityRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof AuthorizationIdentityRequestControl) {
                        return (AuthorizationIdentityRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/AuthorizationIdentityResponseControl.java
@@ -34,7 +34,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The authorization response control as defined in RFC 3829. The authorization
@@ -110,7 +110,7 @@
                public AuthorizationIdentityResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof AuthorizationIdentityResponseControl) {
                        return (AuthorizationIdentityResponseControl) control;
@@ -140,7 +140,7 @@
    // Prevent direct instantiation.
    private AuthorizationIdentityResponseControl(final boolean isCritical,
            final String authorizationID) {
        Validator.ensureNotNull(authorizationID);
        Reject.ifNull(authorizationID);
        this.isCritical = isCritical;
        this.authorizationID = authorizationID;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java
@@ -42,9 +42,9 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * The entry change notification response control as defined in
@@ -107,7 +107,8 @@
                public EntryChangeNotificationResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control, options);
                    Reject.ifNull(control);
                    Reject.ifNull(options);
                    if (control instanceof EntryChangeNotificationResponseControl) {
                        return (EntryChangeNotificationResponseControl) control;
@@ -262,7 +263,7 @@
    private EntryChangeNotificationResponseControl(final boolean isCritical,
            final PersistentSearchChangeType changeType, final DN previousName,
            final long changeNumber) {
        Validator.ensureNotNull(changeType);
        Reject.ifNull(changeType);
        this.isCritical = isCritical;
        this.changeType = changeType;
        this.previousName = previousName;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/GenericControl.java
@@ -29,7 +29,7 @@
import org.forgerock.opendj.ldap.ByteString;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A generic control which can be used to represent arbitrary raw request and
@@ -48,7 +48,7 @@
     *             If {@code control} was {@code null}.
     */
    public static GenericControl newControl(final Control control) {
        Validator.ensureNotNull(control);
        Reject.ifNull(control);
        if (control instanceof GenericControl) {
            return (GenericControl) control;
@@ -122,7 +122,7 @@
    // Prevent direct instantiation.
    private GenericControl(final String oid, final boolean isCritical, final ByteString value) {
        Validator.ensureNotNull(oid);
        Reject.ifNull(oid);
        this.oid = oid;
        this.isCritical = isCritical;
        this.value = value;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/GetEffectiveRightsRequestControl.java
@@ -50,7 +50,7 @@
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A partial implementation of the get effective rights request control as
@@ -117,7 +117,7 @@
                public GetEffectiveRightsRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof GetEffectiveRightsRequestControl) {
                        return (GetEffectiveRightsRequestControl) control;
@@ -230,7 +230,7 @@
     */
    public static GetEffectiveRightsRequestControl newControl(final boolean isCritical,
            final DN authorizationName, final Collection<AttributeType> attributes) {
        Validator.ensureNotNull(attributes);
        Reject.ifNull(attributes);
        final Collection<AttributeType> copyOfAttributes =
                Collections.unmodifiableList(new ArrayList<AttributeType>(attributes));
@@ -267,7 +267,7 @@
     */
    public static GetEffectiveRightsRequestControl newControl(final boolean isCritical,
            final String authorizationName, final String... attributes) {
        Validator.ensureNotNull((Object) attributes);
        Reject.ifNull((Object) attributes);
        final DN dn = authorizationName == null ? null : DN.valueOf(authorizationName);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ManageDsaITRequestControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The ManageDsaIT request control as defined in RFC 3296. This control allows
@@ -92,7 +92,7 @@
                public ManageDsaITRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof ManageDsaITRequestControl) {
                        return (ManageDsaITRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/MatchedValuesRequestControl.java
@@ -49,9 +49,9 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.Filter;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * The matched values request control as defined in RFC 3876. The matched values
@@ -163,7 +163,7 @@
                public MatchedValuesRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof MatchedValuesRequestControl) {
                        return (MatchedValuesRequestControl) control;
@@ -244,8 +244,8 @@
     */
    public static MatchedValuesRequestControl newControl(final boolean isCritical,
            final Collection<Filter> filters) {
        Validator.ensureNotNull(filters);
        Validator.ensureTrue(filters.size() > 0, "filters is empty");
        Reject.ifNull(filters);
        Reject.ifFalse(filters.size() > 0, "filters is empty");
        List<Filter> copyOfFilters;
        if (filters.size() == 1) {
@@ -283,7 +283,7 @@
     */
    public static MatchedValuesRequestControl newControl(final boolean isCritical,
            final String... filters) {
        Validator.ensureTrue(filters.length > 0, "filters is empty");
        Reject.ifFalse(filters.length > 0, "filters is empty");
        final List<Filter> parsedFilters = new ArrayList<Filter>(filters.length);
        for (final String filter : filters) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordExpiredResponseControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Netscape password expired response control as defined in
@@ -89,7 +89,7 @@
                public PasswordExpiredResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PasswordExpiredResponseControl) {
                        return (PasswordExpiredResponseControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordExpiringResponseControl.java
@@ -37,7 +37,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Netscape password expiring response control as defined in
@@ -83,7 +83,7 @@
                public PasswordExpiringResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PasswordExpiringResponseControl) {
                        return (PasswordExpiringResponseControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyRequestControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The password policy request control as defined in
@@ -107,7 +107,7 @@
                public PasswordPolicyRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PasswordPolicyRequestControl) {
                        return (PasswordPolicyRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyResponseControl.java
@@ -40,9 +40,9 @@
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * The password policy response control as defined in
@@ -119,7 +119,7 @@
                public PasswordPolicyResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PasswordPolicyResponseControl) {
                        return (PasswordPolicyResponseControl) control;
@@ -205,7 +205,7 @@
     *             If {@code errorType} was {@code null}.
     */
    public static PasswordPolicyResponseControl newControl(final PasswordPolicyErrorType errorType) {
        Validator.ensureNotNull(errorType);
        Reject.ifNull(errorType);
        return new PasswordPolicyResponseControl(false, null, -1, errorType);
    }
@@ -225,8 +225,8 @@
     */
    public static PasswordPolicyResponseControl newControl(
            final PasswordPolicyWarningType warningType, final int warningValue) {
        Validator.ensureNotNull(warningType);
        Validator.ensureTrue(warningValue >= 0, "warningValue is negative");
        Reject.ifNull(warningType);
        Reject.ifFalse(warningValue >= 0, "warningValue is negative");
        return new PasswordPolicyResponseControl(false, warningType, warningValue, null);
    }
@@ -250,8 +250,9 @@
    public static PasswordPolicyResponseControl newControl(
            final PasswordPolicyWarningType warningType, final int warningValue,
            final PasswordPolicyErrorType errorType) {
        Validator.ensureNotNull(warningType, errorType);
        Validator.ensureTrue(warningValue >= 0, "warningValue is negative");
        Reject.ifNull(warningType);
        Reject.ifNull(errorType);
        Reject.ifFalse(warningValue >= 0, "warningValue is negative");
        return new PasswordPolicyResponseControl(false, warningType, warningValue, errorType);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PermissiveModifyRequestControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The Microsoft defined permissive modify request control. The OID for this
@@ -90,7 +90,7 @@
                public PermissiveModifyRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PermissiveModifyRequestControl) {
                        return (PermissiveModifyRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PersistentSearchRequestControl.java
@@ -49,7 +49,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The persistent search request control as defined in
@@ -114,7 +114,7 @@
                public PersistentSearchRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PersistentSearchRequestControl) {
                        return (PersistentSearchRequestControl) control;
@@ -214,7 +214,7 @@
    public static PersistentSearchRequestControl newControl(final boolean isCritical,
            final boolean changesOnly, final boolean returnECs,
            final Collection<PersistentSearchChangeType> changeTypes) {
        Validator.ensureNotNull(changeTypes);
        Reject.ifNull(changeTypes);
        final Set<PersistentSearchChangeType> copyOfChangeTypes =
                EnumSet.noneOf(PersistentSearchChangeType.class);
@@ -250,7 +250,7 @@
    public static PersistentSearchRequestControl newControl(final boolean isCritical,
            final boolean changesOnly, final boolean returnECs,
            final PersistentSearchChangeType... changeTypes) {
        Validator.ensureNotNull((Object) changeTypes);
        Reject.ifNull((Object) changeTypes);
        return newControl(isCritical, changesOnly, returnECs, Arrays.asList(changeTypes));
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PostReadRequestControl.java
@@ -51,7 +51,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The post-read request control as defined in RFC 4527. This control allows the
@@ -110,7 +110,7 @@
                public PostReadRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PostReadRequestControl) {
                        return (PostReadRequestControl) control;
@@ -187,7 +187,7 @@
     */
    public static PostReadRequestControl newControl(final boolean isCritical,
            final Collection<String> attributes) {
        Validator.ensureNotNull(attributes);
        Reject.ifNull(attributes);
        if (attributes.isEmpty()) {
            return isCritical ? CRITICAL_EMPTY_INSTANCE : NONCRITICAL_EMPTY_INSTANCE;
@@ -218,7 +218,7 @@
     */
    public static PostReadRequestControl newControl(final boolean isCritical,
            final String... attributes) {
        Validator.ensureNotNull((Object) attributes);
        Reject.ifNull((Object) attributes);
        if (attributes.length == 0) {
            return isCritical ? CRITICAL_EMPTY_INSTANCE : NONCRITICAL_EMPTY_INSTANCE;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PostReadResponseControl.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.Entry;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The post-read response control as defined in RFC 4527. This control is
@@ -92,7 +92,7 @@
                public PostReadResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PostReadResponseControl) {
                        return (PostReadResponseControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PreReadRequestControl.java
@@ -51,7 +51,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The pre-read request control as defined in RFC 4527. This control allows the
@@ -109,7 +109,7 @@
                public PreReadRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PreReadRequestControl) {
                        return (PreReadRequestControl) control;
@@ -186,7 +186,7 @@
     */
    public static PreReadRequestControl newControl(final boolean isCritical,
            final Collection<String> attributes) {
        Validator.ensureNotNull(attributes);
        Reject.ifNull(attributes);
        if (attributes.isEmpty()) {
            return isCritical ? CRITICAL_EMPTY_INSTANCE : NONCRITICAL_EMPTY_INSTANCE;
@@ -217,7 +217,7 @@
     */
    public static PreReadRequestControl newControl(final boolean isCritical,
            final String... attributes) {
        Validator.ensureNotNull((Object) attributes);
        Reject.ifNull((Object) attributes);
        if (attributes.length == 0) {
            return isCritical ? CRITICAL_EMPTY_INSTANCE : NONCRITICAL_EMPTY_INSTANCE;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PreReadResponseControl.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.Entry;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The pre-read response control as defined in RFC 4527. This control is
@@ -91,7 +91,7 @@
                public PreReadResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof PreReadResponseControl) {
                        return (PreReadResponseControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ProxiedAuthV1RequestControl.java
@@ -44,7 +44,7 @@
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The proxy authorization v1 request control as defined in
@@ -78,7 +78,7 @@
                public ProxiedAuthV1RequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof ProxiedAuthV1RequestControl) {
                        return (ProxiedAuthV1RequestControl) control;
@@ -147,7 +147,7 @@
     *             If {@code authorizationName} was {@code null}.
     */
    public static ProxiedAuthV1RequestControl newControl(final DN authorizationName) {
        Validator.ensureNotNull(authorizationName);
        Reject.ifNull(authorizationName);
        return new ProxiedAuthV1RequestControl(authorizationName);
    }
@@ -166,7 +166,7 @@
     *             If {@code authorizationName} was {@code null}.
     */
    public static ProxiedAuthV1RequestControl newControl(final String authorizationName) {
        Validator.ensureNotNull(authorizationName);
        Reject.ifNull(authorizationName);
        return new ProxiedAuthV1RequestControl(DN.valueOf(authorizationName));
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ProxiedAuthV2RequestControl.java
@@ -40,7 +40,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The proxy authorization v2 request control as defined in RFC 4370. This
@@ -94,7 +94,7 @@
                public ProxiedAuthV2RequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof ProxiedAuthV2RequestControl) {
                        return (ProxiedAuthV2RequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortRequestControl.java
@@ -48,8 +48,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.SortKey;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The server-side sort request control as defined in RFC 2891. This control may
@@ -114,7 +113,7 @@
                public ServerSideSortRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof ServerSideSortRequestControl) {
                        return (ServerSideSortRequestControl) control;
@@ -195,8 +194,8 @@
     */
    public static ServerSideSortRequestControl newControl(final boolean isCritical,
            final Collection<SortKey> keys) {
        Validator.ensureNotNull(keys);
        Validator.ensureTrue(!keys.isEmpty(), "keys must not be empty");
        Reject.ifNull(keys);
        Reject.ifFalse(!keys.isEmpty(), "keys must not be empty");
        return new ServerSideSortRequestControl(isCritical, Collections
                .unmodifiableList(new ArrayList<SortKey>(keys)));
@@ -245,7 +244,7 @@
     */
    public static ServerSideSortRequestControl newControl(final boolean isCritical,
            final String sortKeys) {
        Validator.ensureNotNull(sortKeys);
        Reject.ifNull(sortKeys);
        final List<SortKey> keys = new LinkedList<SortKey>();
        final StringTokenizer tokenizer = new StringTokenizer(sortKeys, ",");
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java
@@ -45,8 +45,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The server-side sort response control as defined in RFC 2891. This control is
@@ -97,7 +96,8 @@
                public ServerSideSortResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control, options);
                    Reject.ifNull(control);
                    Reject.ifNull(options);
                    if (control instanceof ServerSideSortResponseControl) {
                        return (ServerSideSortResponseControl) control;
@@ -174,7 +174,7 @@
     *             If {@code result} was {@code null}.
     */
    public static ServerSideSortResponseControl newControl(final ResultCode result) {
        Validator.ensureNotNull(result);
        Reject.ifNull(result);
        return new ServerSideSortResponseControl(false, result, null);
    }
@@ -200,7 +200,7 @@
     */
    public static ServerSideSortResponseControl newControl(final ResultCode result,
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(result);
        Reject.ifNull(result);
        return new ServerSideSortResponseControl(false, result, attributeDescription);
    }
@@ -230,7 +230,7 @@
     */
    public static ServerSideSortResponseControl newControl(final ResultCode result,
            final String attributeDescription) {
        Validator.ensureNotNull(result);
        Reject.ifNull(result);
        if (attributeDescription != null) {
            return new ServerSideSortResponseControl(false, result, AttributeDescription
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SimplePagedResultsControl.java
@@ -40,7 +40,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The simple paged results request and response control as defined in RFC 2696.
@@ -147,7 +147,7 @@
                public SimplePagedResultsControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof SimplePagedResultsControl) {
                        return (SimplePagedResultsControl) control;
@@ -243,7 +243,7 @@
     */
    public static SimplePagedResultsControl newControl(final boolean isCritical, final int size,
            final ByteString cookie) {
        Validator.ensureNotNull(cookie);
        Reject.ifNull(cookie);
        return new SimplePagedResultsControl(isCritical, size, cookie);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SubentriesRequestControl.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The sub-entries request control as defined in RFC 3672. This control may be
@@ -115,7 +115,7 @@
                public SubentriesRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof SubentriesRequestControl) {
                        return (SubentriesRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/SubtreeDeleteRequestControl.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The tree delete request control as defined in draft-armijo-ldap-treedelete.
@@ -75,7 +75,7 @@
                public SubtreeDeleteRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof SubtreeDeleteRequestControl) {
                        return (SubtreeDeleteRequestControl) control;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/VirtualListViewRequestControl.java
@@ -43,8 +43,7 @@
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The virtual list view request control as defined in
@@ -145,7 +144,7 @@
                public VirtualListViewRequestControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof VirtualListViewRequestControl) {
                        return (VirtualListViewRequestControl) control;
@@ -258,9 +257,9 @@
    public static VirtualListViewRequestControl newAssertionControl(final boolean isCritical,
            final ByteString assertionValue, final int beforeCount, final int afterCount,
            final ByteString contextID) {
        Validator.ensureNotNull(assertionValue);
        Validator.ensureTrue(beforeCount >= 0, "beforeCount is less than 0");
        Validator.ensureTrue(afterCount >= 0, "afterCount is less than 0");
        Reject.ifNull(assertionValue);
        Reject.ifFalse(beforeCount >= 0, "beforeCount is less than 0");
        Reject.ifFalse(afterCount >= 0, "afterCount is less than 0");
        return new VirtualListViewRequestControl(isCritical, beforeCount, afterCount, -1, -1,
                assertionValue, contextID);
@@ -301,10 +300,10 @@
    public static VirtualListViewRequestControl newOffsetControl(final boolean isCritical,
            final int offset, final int contentCount, final int beforeCount, final int afterCount,
            final ByteString contextID) {
        Validator.ensureTrue(beforeCount >= 0, "beforeCount is less than 0");
        Validator.ensureTrue(afterCount >= 0, "afterCount is less than 0");
        Validator.ensureTrue(offset > 0, "beforeCount is less than 1");
        Validator.ensureTrue(contentCount >= 0, "afterCount is less than 0");
        Reject.ifFalse(beforeCount >= 0, "beforeCount is less than 0");
        Reject.ifFalse(afterCount >= 0, "afterCount is less than 0");
        Reject.ifFalse(offset > 0, "beforeCount is less than 1");
        Reject.ifFalse(contentCount >= 0, "afterCount is less than 0");
        return new VirtualListViewRequestControl(isCritical, beforeCount, afterCount, offset,
                contentCount, null, contextID);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/VirtualListViewResponseControl.java
@@ -42,8 +42,7 @@
import org.forgerock.opendj.ldap.DecodeException;
import org.forgerock.opendj.ldap.DecodeOptions;
import org.forgerock.opendj.ldap.ResultCode;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * The virtual list view response control as defined in
@@ -142,7 +141,7 @@
                public VirtualListViewResponseControl decodeControl(final Control control,
                        final DecodeOptions options) throws DecodeException {
                    Validator.ensureNotNull(control);
                    Reject.ifNull(control);
                    if (control instanceof VirtualListViewResponseControl) {
                        return (VirtualListViewResponseControl) control;
@@ -209,9 +208,9 @@
     */
    public static VirtualListViewResponseControl newControl(final int targetPosition,
            final int contentCount, final ResultCode result, final ByteString contextID) {
        Validator.ensureNotNull(result);
        Validator.ensureTrue(targetPosition >= 0, "targetPosition is less than 0");
        Validator.ensureTrue(contentCount >= 0, "contentCount is less than 0");
        Reject.ifNull(result);
        Reject.ifFalse(targetPosition >= 0, "targetPosition is less than 0");
        Reject.ifFalse(contentCount >= 0, "contentCount is less than 0");
        return new VirtualListViewResponseControl(false, targetPosition, contentCount, result,
                contextID);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java
@@ -35,8 +35,7 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import org.forgerock.opendj.ldap.controls.GenericControl;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Abstract request implementation.
@@ -66,7 +65,7 @@
    }
    AbstractRequestImpl(final Request request) {
        Validator.ensureNotNull(request);
        Reject.ifNull(request);
        for (final Control control : request.getControls()) {
            // Create defensive copy.
            controls.add(GenericControl.newControl(control));
@@ -75,7 +74,7 @@
    @Override
    public final R addControl(final Control control) {
        Validator.ensureNotNull(control);
        Reject.ifNull(control);
        controls.add(control);
        return getThis();
    }
@@ -88,7 +87,8 @@
    @Override
    public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
            final DecodeOptions options) throws DecodeException {
        Validator.ensureNotNull(decoder, options);
        Reject.ifNull(decoder);
        Reject.ifNull(options);
        final Control control = getControl(controls, decoder.getOID());
        return control != null ? decoder.decodeControl(control, options) : null;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java
@@ -37,9 +37,9 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import org.forgerock.opendj.ldap.controls.GenericControl;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.Collections2;
import com.forgerock.opendj.util.Validator;
/**
 * Unmodifiable request implementation.
@@ -68,7 +68,8 @@
    @Override
    public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
            final DecodeOptions options) throws DecodeException {
        Validator.ensureNotNull(decoder, options);
        Reject.ifNull(decoder);
        Reject.ifNull(options);
        final List<Control> controls = impl.getControls();
        final Control control = AbstractRequestImpl.getControl(controls, decoder.getOID());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AnonymousSASLBindRequestImpl.java
@@ -29,7 +29,7 @@
import org.forgerock.opendj.ldap.ByteString;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Anonymous SASL bind request implementation.
@@ -52,7 +52,7 @@
    }
    AnonymousSASLBindRequestImpl(final String traceString) {
        Validator.ensureNotNull(traceString);
        Reject.ifNull(traceString);
        this.traceString = traceString;
    }
@@ -73,7 +73,7 @@
    @Override
    public AnonymousSASLBindRequest setTraceString(final String traceString) {
        Validator.ensureNotNull(traceString);
        Reject.ifNull(traceString);
        this.traceString = traceString;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java
@@ -42,9 +42,9 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.responses.BindResult;
import org.forgerock.opendj.ldap.responses.Responses;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * CRAM-MD5 SASL bind request implementation.
@@ -127,7 +127,8 @@
    }
    CRAMMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) {
        Validator.ensureNotNull(authenticationID, password);
        Reject.ifNull(authenticationID);
        Reject.ifNull(password);
        this.authenticationID = authenticationID;
        this.password = password;
    }
@@ -154,21 +155,21 @@
    @Override
    public CRAMMD5SASLBindRequest setAuthenticationID(final String authenticationID) {
        Validator.ensureNotNull(authenticationID);
        Reject.ifNull(authenticationID);
        this.authenticationID = authenticationID;
        return this;
    }
    @Override
    public CRAMMD5SASLBindRequest setPassword(final byte[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = password;
        return this;
    }
    @Override
    public CRAMMD5SASLBindRequest setPassword(final char[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = StaticUtils.getBytes(password);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CompareRequestImpl.java
@@ -31,7 +31,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DN;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Compare request implementation.
@@ -79,35 +79,35 @@
    @Override
    public CompareRequest setAssertionValue(final Object value) {
        Validator.ensureNotNull(value);
        Reject.ifNull(value);
        this.assertionValue = ByteString.valueOf(value);
        return this;
    }
    @Override
    public CompareRequest setAttributeDescription(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        this.attributeDescription = attributeDescription;
        return this;
    }
    @Override
    public CompareRequest setAttributeDescription(final String attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        this.attributeDescription = AttributeDescription.valueOf(attributeDescription);
        return this;
    }
    @Override
    public CompareRequest setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
    @Override
    public CompareRequest setName(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = DN.valueOf(dn);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DeleteRequestImpl.java
@@ -30,7 +30,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldif.ChangeRecordVisitor;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Delete request implementation.
@@ -59,14 +59,14 @@
    @Override
    public DeleteRequest setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
    @Override
    public DeleteRequest setName(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = DN.valueOf(dn);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java
@@ -53,9 +53,9 @@
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.responses.BindResult;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * Digest-MD5 SASL bind request implementation.
@@ -253,14 +253,16 @@
    }
    DigestMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) {
        Validator.ensureNotNull(authenticationID, password);
        Reject.ifNull(authenticationID);
        Reject.ifNull(password);
        this.authenticationID = authenticationID;
        this.password = password;
    }
    @Override
    public DigestMD5SASLBindRequest addAdditionalAuthParam(final String name, final String value) {
        Validator.ensureNotNull(name, value);
        Reject.ifNull(name);
        Reject.ifNull(value);
        additionalAuthParams.put(name, value);
        return this;
    }
@@ -268,7 +270,7 @@
    @Override
    public DigestMD5SASLBindRequest addQOP(final String... qopValues) {
        for (final String qopValue : qopValues) {
            this.qopValues.add(Validator.ensureNotNull(qopValue));
            this.qopValues.add(Reject.checkNotNull(qopValue));
        }
        return this;
    }
@@ -335,7 +337,7 @@
    @Override
    public DigestMD5SASLBindRequest setAuthenticationID(final String authenticationID) {
        Validator.ensureNotNull(authenticationID);
        Reject.ifNull(authenticationID);
        this.authenticationID = authenticationID;
        return this;
    }
@@ -366,14 +368,14 @@
    @Override
    public DigestMD5SASLBindRequest setPassword(final byte[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = password;
        return this;
    }
    @Override
    public DigestMD5SASLBindRequest setPassword(final char[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = StaticUtils.getBytes(password);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java
@@ -56,9 +56,9 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.responses.BindResult;
import org.forgerock.opendj.ldap.responses.Responses;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import com.sun.security.auth.callback.TextCallbackHandler;
import com.sun.security.auth.module.Krb5LoginModule;
@@ -339,19 +339,21 @@
    }
    GSSAPISASLBindRequestImpl(final String authenticationID, final byte[] password) {
        Validator.ensureNotNull(authenticationID, password);
        Reject.ifNull(authenticationID);
        Reject.ifNull(password);
        this.authenticationID = authenticationID;
        this.password = password;
    }
    GSSAPISASLBindRequestImpl(final Subject subject) {
        Validator.ensureNotNull(subject);
        Reject.ifNull(subject);
        this.subject = subject;
    }
    @Override
    public GSSAPISASLBindRequest addAdditionalAuthParam(final String name, final String value) {
        Validator.ensureNotNull(name, value);
        Reject.ifNull(name);
        Reject.ifNull(value);
        additionalAuthParams.put(name, value);
        return this;
    }
@@ -359,7 +361,7 @@
    @Override
    public GSSAPISASLBindRequest addQOP(final String... qopValues) {
        for (final String qopValue : qopValues) {
            this.qopValues.add(Validator.ensureNotNull(qopValue));
            this.qopValues.add(Reject.checkNotNull(qopValue));
        }
        return this;
    }
@@ -431,7 +433,7 @@
    @Override
    public GSSAPISASLBindRequest setAuthenticationID(final String authenticationID) {
        Validator.ensureNotNull(authenticationID);
        Reject.ifNull(authenticationID);
        this.authenticationID = authenticationID;
        return this;
    }
@@ -462,14 +464,14 @@
    @Override
    public GSSAPISASLBindRequest setPassword(final byte[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = password;
        return this;
    }
    @Override
    public GSSAPISASLBindRequest setPassword(final char[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = StaticUtils.getBytes(password);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GenericBindRequestImpl.java
@@ -32,7 +32,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ErrorResultException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Generic bind request implementation.
@@ -103,14 +103,14 @@
    @Override
    public GenericBindRequest setAuthenticationValue(final byte[] bytes) {
        Validator.ensureNotNull(bytes);
        Reject.ifNull(bytes);
        this.authenticationValue = bytes;
        return this;
    }
    @Override
    public GenericBindRequest setName(final String name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        this.name = name;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GenericExtendedRequestImpl.java
@@ -39,7 +39,7 @@
import org.forgerock.opendj.ldap.responses.Responses;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Generic extended request implementation.
@@ -136,7 +136,7 @@
    @Override
    public GenericExtendedRequest setOID(final String oid) {
        Validator.ensureNotNull(oid);
        Reject.ifNull(oid);
        this.requestName = oid;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyDNRequestImpl.java
@@ -31,7 +31,7 @@
import org.forgerock.opendj.ldap.RDN;
import org.forgerock.opendj.ldif.ChangeRecordVisitor;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Modify DN request implementation.
@@ -89,28 +89,28 @@
    @Override
    public ModifyDNRequest setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
    @Override
    public ModifyDNRequest setName(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = DN.valueOf(dn);
        return this;
    }
    @Override
    public ModifyDNRequest setNewRDN(final RDN rdn) {
        Validator.ensureNotNull(rdn);
        Reject.ifNull(rdn);
        this.newRDN = rdn;
        return this;
    }
    @Override
    public ModifyDNRequest setNewRDN(final String rdn) {
        Validator.ensureNotNull(rdn);
        Reject.ifNull(rdn);
        this.newRDN = RDN.valueOf(rdn);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java
@@ -36,8 +36,7 @@
import org.forgerock.opendj.ldap.Modification;
import org.forgerock.opendj.ldap.ModificationType;
import org.forgerock.opendj.ldif.ChangeRecordVisitor;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Modify request implementation.
@@ -70,7 +69,7 @@
    @Override
    public ModifyRequest addModification(final Modification change) {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        changes.add(change);
        return this;
    }
@@ -78,7 +77,9 @@
    @Override
    public ModifyRequest addModification(final ModificationType type,
            final String attributeDescription, final Object... values) {
        Validator.ensureNotNull(type, attributeDescription, values);
        Reject.ifNull(type);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(values);
        changes.add(new Modification(type, new LinkedAttribute(attributeDescription, values)));
        return this;
    }
@@ -95,14 +96,14 @@
    @Override
    public ModifyRequest setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
    @Override
    public ModifyRequest setName(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = DN.valueOf(dn);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java
@@ -40,9 +40,9 @@
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.responses.BindResult;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * Plain SASL bind request implementation.
@@ -115,7 +115,8 @@
    }
    PlainSASLBindRequestImpl(final String authenticationID, final byte[] password) {
        Validator.ensureNotNull(authenticationID, password);
        Reject.ifNull(authenticationID);
        Reject.ifNull(password);
        this.authenticationID = authenticationID;
        this.password = password;
    }
@@ -147,7 +148,7 @@
    @Override
    public PlainSASLBindRequest setAuthenticationID(final String authenticationID) {
        Validator.ensureNotNull(authenticationID);
        Reject.ifNull(authenticationID);
        this.authenticationID = authenticationID;
        return this;
    }
@@ -160,14 +161,14 @@
    @Override
    public PlainSASLBindRequest setPassword(final byte[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = password;
        return this;
    }
    @Override
    public PlainSASLBindRequest setPassword(final char[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = StaticUtils.getBytes(password);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java
@@ -48,8 +48,7 @@
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.ldif.ChangeRecord;
import org.forgerock.opendj.ldif.LDIFChangeRecordReader;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class contains various methods for creating and manipulating requests.
@@ -413,7 +412,7 @@
     *             If {@code entry} was {@code null} .
     */
    public static AddRequest newAddRequest(final Entry entry) {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        return new AddRequestImpl(entry);
    }
@@ -529,7 +528,9 @@
     */
    public static CompareRequest newCompareRequest(final DN name,
            final AttributeDescription attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(name, attributeDescription, assertionValue);
        Reject.ifNull(name);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new CompareRequestImpl(name, attributeDescription, ByteString
                .valueOf(assertionValue));
    }
@@ -557,7 +558,9 @@
     */
    public static CompareRequest newCompareRequest(final String name,
            final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(name, attributeDescription, assertionValue);
        Reject.ifNull(name);
        Reject.ifNull(attributeDescription);
        Reject.ifNull(assertionValue);
        return new CompareRequestImpl(DN.valueOf(name), AttributeDescription
                .valueOf(attributeDescription), ByteString.valueOf(assertionValue));
    }
@@ -615,7 +618,7 @@
     *             If {@code name} was {@code null}.
     */
    public static DeleteRequest newDeleteRequest(final DN name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        return new DeleteRequestImpl(name);
    }
@@ -633,7 +636,7 @@
     *             If {@code name} was {@code null}.
     */
    public static DeleteRequest newDeleteRequest(final String name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        return new DeleteRequestImpl(DN.valueOf(name));
    }
@@ -705,7 +708,7 @@
     */
    public static GenericBindRequest newGenericBindRequest(final byte authenticationType,
            final byte[] authenticationValue) {
        Validator.ensureNotNull(authenticationValue);
        Reject.ifNull(authenticationValue);
        return new GenericBindRequestImpl("", authenticationType, authenticationValue);
    }
@@ -733,7 +736,8 @@
     */
    public static GenericBindRequest newGenericBindRequest(final String name,
            final byte authenticationType, final byte[] authenticationValue) {
        Validator.ensureNotNull(name, authenticationValue);
        Reject.ifNull(name);
        Reject.ifNull(authenticationValue);
        return new GenericBindRequestImpl(name, authenticationType, authenticationValue);
    }
@@ -749,7 +753,7 @@
     *             If {@code requestName} was {@code null}.
     */
    public static GenericExtendedRequest newGenericExtendedRequest(final String requestName) {
        Validator.ensureNotNull(requestName);
        Reject.ifNull(requestName);
        return new GenericExtendedRequestImpl(requestName);
    }
@@ -773,7 +777,7 @@
     */
    public static GenericExtendedRequest newGenericExtendedRequest(final String requestName,
            final Object requestValue) {
        Validator.ensureNotNull(requestName);
        Reject.ifNull(requestName);
        return new GenericExtendedRequestImpl(requestName).setValue(requestValue);
    }
@@ -847,7 +851,8 @@
     *             If {@code name} or {@code newRDN} was {@code null}.
     */
    public static ModifyDNRequest newModifyDNRequest(final DN name, final RDN newRDN) {
        Validator.ensureNotNull(name, newRDN);
        Reject.ifNull(name);
        Reject.ifNull(newRDN);
        return new ModifyDNRequestImpl(name, newRDN);
    }
@@ -867,7 +872,8 @@
     *             If {@code name} or {@code newRDN} was {@code null}.
     */
    public static ModifyDNRequest newModifyDNRequest(final String name, final String newRDN) {
        Validator.ensureNotNull(name, newRDN);
        Reject.ifNull(name);
        Reject.ifNull(newRDN);
        return new ModifyDNRequestImpl(DN.valueOf(name), RDN.valueOf(newRDN));
    }
@@ -881,7 +887,7 @@
     *             If {@code name} was {@code null}.
     */
    public static ModifyRequest newModifyRequest(final DN name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        return new ModifyRequestImpl(name);
    }
@@ -931,7 +937,7 @@
     *             If {@code name} was {@code null}.
     */
    public static ModifyRequest newModifyRequest(final String name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        return new ModifyRequestImpl(DN.valueOf(name));
    }
@@ -1036,7 +1042,9 @@
     */
    public static SearchRequest newSearchRequest(final DN name, final SearchScope scope,
            final Filter filter, final String... attributeDescriptions) {
        Validator.ensureNotNull(name, scope, filter);
        Reject.ifNull(name);
        Reject.ifNull(scope);
        Reject.ifNull(filter);
        final SearchRequest request = new SearchRequestImpl(name, scope, filter);
        for (final String attributeDescription : attributeDescriptions) {
            request.addAttribute(attributeDescription);
@@ -1069,7 +1077,9 @@
     */
    public static SearchRequest newSearchRequest(final String name, final SearchScope scope,
            final String filter, final String... attributeDescriptions) {
        Validator.ensureNotNull(name, scope, filter);
        Reject.ifNull(name);
        Reject.ifNull(scope);
        Reject.ifNull(filter);
        final SearchRequest request =
                new SearchRequestImpl(DN.valueOf(name), scope, Filter.valueOf(filter));
        for (final String attributeDescription : attributeDescriptions) {
@@ -1161,7 +1171,8 @@
     *             If {@code name} or {@code password} was {@code null}.
     */
    public static SimpleBindRequest newSimpleBindRequest(final String name, final byte[] password) {
        Validator.ensureNotNull(name, password);
        Reject.ifNull(name);
        Reject.ifNull(password);
        return new SimpleBindRequestImpl(name, password);
    }
@@ -1187,7 +1198,8 @@
     *             If {@code name} or {@code password} was {@code null}.
     */
    public static SimpleBindRequest newSimpleBindRequest(final String name, final char[] password) {
        Validator.ensureNotNull(name, password);
        Reject.ifNull(name);
        Reject.ifNull(password);
        return new SimpleBindRequestImpl(name, getBytes(password));
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/SearchRequestImpl.java
@@ -34,8 +34,7 @@
import org.forgerock.opendj.ldap.DereferenceAliasesPolicy;
import org.forgerock.opendj.ldap.Filter;
import org.forgerock.opendj.ldap.SearchScope;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Search request implementation.
@@ -71,7 +70,7 @@
    @Override
    public SearchRequest addAttribute(final String... attributeDescriptions) {
        for (final String attributeDescription : attributeDescriptions) {
            attributes.add(Validator.ensureNotNull(attributeDescription));
            attributes.add(Reject.checkNotNull(attributeDescription));
        }
        return this;
    }
@@ -123,7 +122,7 @@
    @Override
    public SearchRequest setDereferenceAliasesPolicy(final DereferenceAliasesPolicy policy) {
        Validator.ensureNotNull(policy);
        Reject.ifNull(policy);
        this.dereferenceAliasesPolicy = policy;
        return this;
@@ -131,7 +130,7 @@
    @Override
    public SearchRequest setFilter(final Filter filter) {
        Validator.ensureNotNull(filter);
        Reject.ifNull(filter);
        this.filter = filter;
        return this;
@@ -145,7 +144,7 @@
    @Override
    public SearchRequest setName(final DN dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = dn;
        return this;
@@ -153,7 +152,7 @@
    @Override
    public SearchRequest setName(final String dn) {
        Validator.ensureNotNull(dn);
        Reject.ifNull(dn);
        this.name = DN.valueOf(dn);
        return this;
@@ -161,7 +160,7 @@
    @Override
    public SearchRequest setScope(final SearchScope scope) {
        Validator.ensureNotNull(scope);
        Reject.ifNull(scope);
        this.scope = scope;
        return this;
@@ -169,7 +168,7 @@
    @Override
    public SearchRequest setSizeLimit(final int limit) {
        Validator.ensureTrue(limit >= 0, "negative size limit");
        Reject.ifFalse(limit >= 0, "negative size limit");
        this.sizeLimit = limit;
        return this;
@@ -177,7 +176,7 @@
    @Override
    public SearchRequest setTimeLimit(final int limit) {
        Validator.ensureTrue(limit >= 0, "negative time limit");
        Reject.ifFalse(limit >= 0, "negative time limit");
        this.timeLimit = limit;
        return this;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/SimpleBindRequestImpl.java
@@ -31,7 +31,7 @@
import org.forgerock.opendj.ldap.ErrorResultException;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Simple bind request implementation.
@@ -74,21 +74,21 @@
    @Override
    public SimpleBindRequest setName(final String name) {
        Validator.ensureNotNull(name);
        Reject.ifNull(name);
        this.name = name;
        return this;
    }
    @Override
    public SimpleBindRequest setPassword(final byte[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = password;
        return this;
    }
    @Override
    public SimpleBindRequest setPassword(final char[] password) {
        Validator.ensureNotNull(password);
        Reject.ifNull(password);
        this.password = StaticUtils.getBytes(password);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/StartTLSExtendedRequestImpl.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.responses.GenericExtendedResult;
import org.forgerock.opendj.ldap.responses.Responses;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Start TLS extended request implementation.
@@ -99,7 +99,7 @@
    private SSLContext sslContext;
    StartTLSExtendedRequestImpl(final SSLContext sslContext) {
        Validator.ensureNotNull(sslContext);
        Reject.ifNull(sslContext);
        this.sslContext = sslContext;
    }
@@ -118,7 +118,7 @@
    @Override
    public StartTLSExtendedRequest addEnabledCipherSuite(final String... suites) {
        for (final String suite : suites) {
            this.enabledCipherSuites.add(Validator.ensureNotNull(suite));
            this.enabledCipherSuites.add(Reject.checkNotNull(suite));
        }
        return this;
    }
@@ -126,7 +126,7 @@
    @Override
    public StartTLSExtendedRequest addEnabledProtocol(final String... protocols) {
        for (final String protocol : protocols) {
            this.enabledProtocols.add(Validator.ensureNotNull(protocol));
            this.enabledProtocols.add(Reject.checkNotNull(protocol));
        }
        return this;
    }
@@ -168,7 +168,7 @@
    @Override
    public StartTLSExtendedRequest setSSLContext(final SSLContext sslContext) {
        Validator.ensureNotNull(sslContext);
        Reject.ifNull(sslContext);
        this.sslContext = sslContext;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java
@@ -35,8 +35,7 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import org.forgerock.opendj.ldap.controls.GenericControl;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Modifiable response implementation.
@@ -65,7 +64,7 @@
    }
    AbstractResponseImpl(final Response response) {
        Validator.ensureNotNull(response);
        Reject.ifNull(response);
        for (final Control control : response.getControls()) {
            // Create defensive copy.
            controls.add(GenericControl.newControl(control));
@@ -74,7 +73,7 @@
    @Override
    public final S addControl(final Control control) {
        Validator.ensureNotNull(control);
        Reject.ifNull(control);
        controls.add(control);
        return getThis();
    }
@@ -87,7 +86,8 @@
    @Override
    public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
            final DecodeOptions options) throws DecodeException {
        Validator.ensureNotNull(decoder, options);
        Reject.ifNull(decoder);
        Reject.ifNull(options);
        final Control control = getControl(controls, decoder.getOID());
        return control != null ? decoder.decodeControl(control, options) : null;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResultImpl.java
@@ -32,7 +32,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Modifiable result implementation.
@@ -64,7 +64,7 @@
    @Override
    public final S addReferralURI(final String uri) {
        Validator.ensureNotNull(uri);
        Reject.ifNull(uri);
        referralURIs.add(uri);
        return getThis();
@@ -137,7 +137,7 @@
    @Override
    public final S setResultCode(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        this.resultCode = resultCode;
        return getThis();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java
@@ -37,9 +37,9 @@
import org.forgerock.opendj.ldap.controls.Control;
import org.forgerock.opendj.ldap.controls.ControlDecoder;
import org.forgerock.opendj.ldap.controls.GenericControl;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.Collections2;
import com.forgerock.opendj.util.Validator;
/**
 * Unmodifiable response implementation.
@@ -52,7 +52,7 @@
    protected final S impl;
    AbstractUnmodifiableResponseImpl(final S impl) {
        Validator.ensureNotNull(impl);
        Reject.ifNull(impl);
        this.impl = impl;
    }
@@ -69,7 +69,8 @@
    @Override
    public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
            final DecodeOptions options) throws DecodeException {
        Validator.ensureNotNull(decoder, options);
        Reject.ifNull(decoder);
        Reject.ifNull(options);
        final List<Control> controls = impl.getControls();
        final Control control = AbstractResponseImpl.getControl(controls, decoder.getOID());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java
@@ -34,7 +34,7 @@
import org.forgerock.opendj.ldap.LinkedHashMapEntry;
import org.forgerock.opendj.ldap.ResultCode;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class contains various methods for creating and manipulating responses.
@@ -194,7 +194,7 @@
     *             If {@code resultCode} was {@code null}.
     */
    public static BindResult newBindResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new BindResultImpl(resultCode);
    }
@@ -208,7 +208,7 @@
     *             If {@code resultCode} was {@code null}.
     */
    public static CompareResult newCompareResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new CompareResultImpl(resultCode);
    }
@@ -222,7 +222,7 @@
     *             If {@code resultCode} was {@code null}.
     */
    public static GenericExtendedResult newGenericExtendedResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new GenericExtendedResultImpl(resultCode);
    }
@@ -269,7 +269,7 @@
     */
    public static PasswordModifyExtendedResult newPasswordModifyExtendedResult(
            final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new PasswordModifyExtendedResultImpl(resultCode);
    }
@@ -283,7 +283,7 @@
     *             If {@code resultCode} was {@code null}.
     */
    public static Result newResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new ResultImpl(resultCode);
    }
@@ -315,7 +315,7 @@
     *             If {@code entry} was {@code null} .
     */
    public static SearchResultEntry newSearchResultEntry(final Entry entry) {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        return new SearchResultEntryImpl(entry);
    }
@@ -367,7 +367,7 @@
     *             If {@code uri} was {@code null}.
     */
    public static SearchResultReference newSearchResultReference(final String uri) {
        Validator.ensureNotNull(uri);
        Reject.ifNull(uri);
        return new SearchResultReferenceImpl(uri);
    }
@@ -382,7 +382,7 @@
     *             If {@code resultCode} was {@code null} .
     */
    public static WhoAmIExtendedResult newWhoAmIExtendedResult(final ResultCode resultCode) {
        Validator.ensureNotNull(resultCode);
        Reject.ifNull(resultCode);
        return new WhoAmIExtendedResultImpl(ResultCode.SUCCESS);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/SearchResultReferenceImpl.java
@@ -30,7 +30,7 @@
import java.util.LinkedList;
import java.util.List;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Search result reference implementation.
@@ -51,7 +51,7 @@
    @Override
    public SearchResultReference addURI(final String uri) {
        Validator.ensureNotNull(uri);
        Reject.ifNull(uri);
        uris.add(uri);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
@@ -36,9 +36,9 @@
import java.util.Map;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * This class defines a data structure for storing and interacting with an
@@ -136,10 +136,12 @@
            final String definition) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(oid, names, description, attributeUsage);
        Validator.ensureTrue(superiorType != null || syntax != null,
                "superiorType and/or syntax must not be null");
        Validator.ensureNotNull(extraProperties);
        Reject.ifNull(oid);
        Reject.ifNull(names);
        Reject.ifNull(description);
        Reject.ifNull(attributeUsage);
        Reject.ifFalse(superiorType != null || syntax != null, "superiorType and/or syntax must not be null");
        Reject.ifNull(extraProperties);
        this.oid = oid;
        this.names = names;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
@@ -37,8 +37,7 @@
import java.util.Set;
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a DIT content rule, which defines the set of allowed,
@@ -83,9 +82,12 @@
            final Map<String, List<String>> extraProperties, final String definition) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(structuralClassOID, names);
        Validator.ensureNotNull(auxiliaryClassOIDs, optionalAttributeOIDs, prohibitedAttributeOIDs,
                requiredAttributeOIDs);
        Reject.ifNull(structuralClassOID);
        Reject.ifNull(names);
        Reject.ifNull(auxiliaryClassOIDs);
        Reject.ifNull(optionalAttributeOIDs);
        Reject.ifNull(prohibitedAttributeOIDs);
        Reject.ifNull(requiredAttributeOIDs);
        this.names = names;
        this.isObsolete = obsolete;
        this.structuralClassOID = structuralClassOID;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
@@ -38,8 +38,7 @@
import java.util.Set;
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a DIT structure rule, which is used to indicate the types
@@ -75,7 +74,9 @@
            final Map<String, List<String>> extraProperties, final String definition) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(ruleID, nameFormOID, superiorRuleIDs);
        Reject.ifNull(ruleID);
        Reject.ifNull(nameFormOID);
        Reject.ifNull(superiorRuleIDs);
        this.ruleID = ruleID;
        this.names = names;
        this.isObsolete = obsolete;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumOrderingMatchingRule.java
@@ -31,7 +31,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DecodeException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class is the ordering matching rule implementation for an enum syntax
@@ -42,7 +42,7 @@
    private final EnumSyntaxImpl syntax;
    EnumOrderingMatchingRule(final EnumSyntaxImpl syntax) {
        Validator.ensureNotNull(syntax);
        Reject.ifNull(syntax);
        this.syntax = syntax;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java
@@ -43,8 +43,7 @@
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class provides an enumeration-based mechanism where a new syntax and its
@@ -57,7 +56,8 @@
    private final List<String> entries;
    EnumSyntaxImpl(final String oid, final List<String> entries) {
        Validator.ensureNotNull(oid, entries);
        Reject.ifNull(oid);
        Reject.ifNull(entries);
        this.oid = oid;
        final List<String> entryStrings = new ArrayList<String>(entries.size());
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java
@@ -37,8 +37,7 @@
import java.util.Set;
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a data structure for storing and interacting with a
@@ -68,7 +67,9 @@
            final Map<String, List<String>> extraProperties, final String definition) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(oid, names, attributeOIDs);
        Reject.ifNull(oid);
        Reject.ifNull(names);
        Reject.ifNull(attributeOIDs);
        this.oid = oid;
        this.names = names;
        this.isObsolete = obsolete;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -39,8 +39,7 @@
import java.util.Set;
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a data structure for storing and interacting with an
@@ -92,9 +91,12 @@
            final String definition) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(oid, names);
        Validator.ensureNotNull(superiorClassOIDs, requiredAttributeOIDs, optionalAttributeOIDs,
                objectClassType);
        Reject.ifNull(oid);
        Reject.ifNull(names);
        Reject.ifNull(superiorClassOIDs);
        Reject.ifNull(requiredAttributeOIDs);
        Reject.ifNull(optionalAttributeOIDs);
        Reject.ifNull(objectClassType);
        this.oid = oid;
        this.names = names;
        this.isObsolete = obsolete;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/RegexSyntaxImpl.java
@@ -38,7 +38,7 @@
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.opendj.ldap.ByteSequence;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class provides a regex mechanism where a new syntax and its
@@ -50,7 +50,7 @@
    private final Pattern pattern;
    RegexSyntaxImpl(final Pattern pattern) {
        Validator.ensureNotNull(pattern);
        Reject.ifNull(pattern);
        this.pattern = pattern;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Schema.java
@@ -54,7 +54,7 @@
import com.forgerock.opendj.util.FutureResultTransformer;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a data structure that holds information about the
@@ -1328,7 +1328,7 @@
     *            The default schema which should be used by this application.
     */
    public static void setDefaultSchema(final Schema schema) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        DefaultSchema.schema = schema;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java
@@ -75,7 +75,7 @@
import com.forgerock.opendj.util.RecursiveFutureResult;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.SubstringReader;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Schema builders should be used for incremental construction of new schemas.
@@ -231,7 +231,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addAttributeType(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -532,7 +532,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addDITContentRule(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -762,7 +762,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addDITStructureRule(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -892,7 +892,7 @@
     */
    public SchemaBuilder addEnumerationSyntax(final String oid, final String description,
            final boolean overwrite, final String... enumerations) {
        Validator.ensureNotNull((Object) enumerations);
        Reject.ifNull((Object) enumerations);
        lazyInitBuilder();
@@ -933,7 +933,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addMatchingRule(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -1054,7 +1054,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addMatchingRuleUse(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -1237,7 +1237,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addNameForm(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -1488,7 +1488,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addObjectClass(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
@@ -1696,7 +1696,7 @@
     */
    public SchemaBuilder addPatternSyntax(final String oid, final String description,
            final Pattern pattern, final boolean overwrite) {
        Validator.ensureNotNull(pattern);
        Reject.ifNull(pattern);
        lazyInitBuilder();
@@ -1756,7 +1756,7 @@
     *             If {@code entry} was {@code null}.
     */
    public SchemaBuilder addSchema(final Entry entry, final boolean overwrite) {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        lazyInitBuilder();
@@ -1868,7 +1868,7 @@
     *             If {@code schema} was {@code null}.
     */
    public SchemaBuilder addSchema(final Schema schema, final boolean overwrite) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        lazyInitBuilder();
@@ -2048,7 +2048,7 @@
     */
    public SchemaBuilder addSubstitutionSyntax(final String oid, final String description,
            final String substituteSyntax, final boolean overwrite) {
        Validator.ensureNotNull(substituteSyntax);
        Reject.ifNull(substituteSyntax);
        lazyInitBuilder();
@@ -2075,7 +2075,7 @@
     *             If {@code definition} was {@code null}.
     */
    public SchemaBuilder addSyntax(final String definition, final boolean overwrite) {
        Validator.ensureNotNull(definition);
        Reject.ifNull(definition);
        lazyInitBuilder();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java
@@ -36,7 +36,7 @@
import java.util.List;
import java.util.Map;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An abstract base class for LDAP schema definitions which contain an
@@ -210,7 +210,8 @@
    SchemaElement(final String description, final Map<String, List<String>> extraProperties,
            final String definition) {
        Validator.ensureNotNull(description, extraProperties);
        Reject.ifNull(description);
        Reject.ifNull(extraProperties);
        this.description = description;
        this.extraProperties = extraProperties; // Should already be unmodifiable.
        this.definition = definition;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java
@@ -39,7 +39,7 @@
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.opendj.ldap.ByteSequence;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * This class defines a data structure for storing and interacting with an LDAP
@@ -77,7 +77,7 @@
                Collections.singletonList(schema.getDefaultSyntax().getOID())),
                null);
        Validator.ensureNotNull(oid);
        Reject.ifNull(oid);
        this.oid = oid;
        this.schema = schema;
        this.impl = schema.getDefaultSyntax().impl;
@@ -88,7 +88,7 @@
            final SyntaxImpl implementation) {
        super(description, extraProperties, definition);
        Validator.ensureNotNull(oid);
        Reject.ifNull(oid);
        this.oid = oid;
        this.impl = implementation;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/AbstractLDIFReader.java
@@ -68,7 +68,7 @@
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Common LDIF reader functionality.
@@ -186,7 +186,7 @@
    }
    AbstractLDIFReader(final List<String> ldifLines) {
        Validator.ensureNotNull(ldifLines);
        Reject.ifNull(ldifLines);
        this.impl = new LDIFReaderListImpl(ldifLines);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/AbstractLDIFWriter.java
@@ -39,7 +39,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.controls.Control;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Common LDIF writer functionality.
@@ -194,7 +194,7 @@
    }
    final void writeComment0(final CharSequence comment) throws IOException {
        Validator.ensureNotNull(comment);
        Reject.ifNull(comment);
        /*
         * First, break up the comment into multiple lines to preserve the
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionChangeRecordWriter.java
@@ -37,7 +37,7 @@
import org.forgerock.opendj.ldap.requests.ModifyDNRequest;
import org.forgerock.opendj.ldap.requests.ModifyRequest;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A {@code ConnectionChangeRecordWriter} is a bridge from {@code Connection}s
@@ -66,7 +66,7 @@
     *             If {@code connection} was {@code null}.
     */
    public ConnectionChangeRecordWriter(final Connection connection) {
        Validator.ensureNotNull(connection);
        Reject.ifNull(connection);
        this.connection = connection;
    }
@@ -102,7 +102,7 @@
     */
    public ConnectionChangeRecordWriter writeChangeRecord(final AddRequest change)
            throws ErrorResultIOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        try {
            connection.add(change);
        } catch (final ErrorResultException e) {
@@ -126,7 +126,7 @@
     */
    public ConnectionChangeRecordWriter writeChangeRecord(final ChangeRecord change)
            throws ErrorResultIOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        final IOException e = change.accept(ChangeRecordVisitorWriter.getInstance(), this);
        try {
@@ -157,7 +157,7 @@
     */
    public ConnectionChangeRecordWriter writeChangeRecord(final DeleteRequest change)
            throws ErrorResultIOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        try {
            connection.delete(change);
        } catch (final ErrorResultException e) {
@@ -181,7 +181,7 @@
     */
    public ConnectionChangeRecordWriter writeChangeRecord(final ModifyDNRequest change)
            throws ErrorResultIOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        try {
            connection.modifyDN(change);
        } catch (final ErrorResultException e) {
@@ -205,7 +205,7 @@
     */
    public ConnectionChangeRecordWriter writeChangeRecord(final ModifyRequest change)
            throws ErrorResultIOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        try {
            connection.modify(change);
        } catch (final ErrorResultException e) {
@@ -225,7 +225,7 @@
     *             If {@code comment} was {@code null}.
     */
    public ConnectionChangeRecordWriter writeComment(final CharSequence comment) {
        Validator.ensureNotNull(comment);
        Reject.ifNull(comment);
        // Do nothing.
        return this;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
@@ -48,7 +48,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultEntry;
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A {@code ConnectionEntryReader} is a bridge from {@code Connection}s to
@@ -210,7 +210,7 @@
     */
    public ConnectionEntryReader(final Connection connection, final SearchRequest searchRequest,
            final BlockingQueue<Response> entries) {
        Validator.ensureNotNull(connection);
        Reject.ifNull(connection);
        buffer = new BufferHandler(entries);
        future = connection.searchAsync(searchRequest, null, buffer);
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryWriter.java
@@ -32,7 +32,7 @@
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.ErrorResultIOException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A {@code ConnectionEntryWriter} is a bridge from {@code Connection}s to
@@ -60,7 +60,7 @@
     *             If {@code connection} was {@code null}.
     */
    public ConnectionEntryWriter(final Connection connection) {
        Validator.ensureNotNull(connection);
        Reject.ifNull(connection);
        this.connection = connection;
    }
@@ -91,7 +91,7 @@
     *             If {@code comment} was {@code null}.
     */
    public ConnectionEntryWriter writeComment(final CharSequence comment) {
        Validator.ensureNotNull(comment);
        Reject.ifNull(comment);
        // Do nothing.
        return this;
@@ -111,7 +111,7 @@
     *             If {@code entry} was {@code null}.
     */
    public ConnectionEntryWriter writeEntry(final Entry entry) throws ErrorResultIOException {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        try {
            connection.add(entry);
        } catch (final ErrorResultException e) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/EntryGenerator.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.schema.Schema;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A template driven entry generator, as used by the make-ldif tool.
@@ -130,7 +130,7 @@
     *            Path of the template file.
     */
    public EntryGenerator(final String  templatePath) {
        Validator.ensureNotNull(templatePath);
        Reject.ifNull(templatePath);
        this.templatePath = templatePath;
    }
@@ -141,7 +141,7 @@
     *            Lines defining the template file.
     */
    public EntryGenerator(final String... templateLines) {
        Validator.ensureNotNull((Object[]) templateLines);
        Reject.ifNull(templateLines);
        this.templateLines = templateLines;
    }
@@ -152,7 +152,7 @@
     *            Lines defining the template file.
     */
    public EntryGenerator(final List<String> templateLines) {
        Validator.ensureNotNull(templateLines);
        Reject.ifNull(templateLines);
        this.templateLines = templateLines.toArray(new String[templateLines.size()]);
    }
@@ -163,7 +163,7 @@
     *            Input stream to read the template file.
     */
    public EntryGenerator(final InputStream templateStream) {
        Validator.ensureNotNull(templateStream);
        Reject.ifNull(templateStream);
        this.templateStream = templateStream;
    }
@@ -188,7 +188,7 @@
     * @return A reference to this {@code EntryGenerator}.
     */
    public EntryGenerator setResourcePath(final String path) {
        Validator.ensureNotNull(path);
        Reject.ifNull(path);
        resourcePath = path;
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordReader.java
@@ -84,7 +84,7 @@
import org.forgerock.opendj.ldap.schema.Syntax;
import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDIF change record reader reads change records using the LDAP Data
@@ -298,7 +298,7 @@
     */
    public LDIFChangeRecordReader setExcludeAttribute(
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        excludeAttributes.add(attributeDescription);
        return this;
    }
@@ -313,7 +313,7 @@
     * @return A reference to this {@code LDIFChangeRecordReader}.
     */
    public LDIFChangeRecordReader setExcludeBranch(final DN excludeBranch) {
        Validator.ensureNotNull(excludeBranch);
        Reject.ifNull(excludeBranch);
        excludeBranches.add(excludeBranch);
        return this;
    }
@@ -329,7 +329,7 @@
     */
    public LDIFChangeRecordReader setIncludeAttribute(
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        includeAttributes.add(attributeDescription);
        return this;
    }
@@ -344,7 +344,7 @@
     * @return A reference to this {@code LDIFChangeRecordReader}.
     */
    public LDIFChangeRecordReader setIncludeBranch(final DN includeBranch) {
        Validator.ensureNotNull(includeBranch);
        Reject.ifNull(includeBranch);
        includeBranches.add(includeBranch);
        return this;
    }
@@ -374,7 +374,7 @@
     * @return A reference to this {@code LDIFChangeRecordReader}.
     */
    public LDIFChangeRecordReader setSchema(final Schema schema) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        this.schema = schemaValidationPolicy.adaptSchemaForValidation(schema);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordWriter.java
@@ -44,7 +44,7 @@
import org.forgerock.opendj.ldap.requests.ModifyDNRequest;
import org.forgerock.opendj.ldap.requests.ModifyRequest;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDIF change record writer writes change records using the LDAP Data
@@ -196,7 +196,7 @@
     */
    public LDIFChangeRecordWriter setExcludeAttribute(
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        excludeAttributes.add(attributeDescription);
        return this;
    }
@@ -211,7 +211,7 @@
     * @return A reference to this {@code LDIFChangeRecordWriter}.
     */
    public LDIFChangeRecordWriter setExcludeBranch(final DN excludeBranch) {
        Validator.ensureNotNull(excludeBranch);
        Reject.ifNull(excludeBranch);
        excludeBranches.add(excludeBranch);
        return this;
    }
@@ -227,7 +227,7 @@
     */
    public LDIFChangeRecordWriter setIncludeAttribute(
            final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        includeAttributes.add(attributeDescription);
        return this;
    }
@@ -242,7 +242,7 @@
     * @return A reference to this {@code LDIFChangeRecordWriter}.
     */
    public LDIFChangeRecordWriter setIncludeBranch(final DN includeBranch) {
        Validator.ensureNotNull(includeBranch);
        Reject.ifNull(includeBranch);
        includeBranches.add(includeBranch);
        return this;
    }
@@ -266,7 +266,7 @@
     */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final AddRequest change) throws IOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        // Skip if branch containing the entry is excluded.
        if (isBranchExcluded(change.getName())) {
@@ -299,7 +299,7 @@
     */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ChangeRecord change) throws IOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        // Skip if branch containing the entry is excluded.
        if (isBranchExcluded(change.getName())) {
@@ -319,7 +319,7 @@
     */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final DeleteRequest change) throws IOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        // Skip if branch containing the entry is excluded.
        if (isBranchExcluded(change.getName())) {
@@ -342,7 +342,7 @@
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ModifyDNRequest change)
            throws IOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        // Skip if branch containing the entry is excluded.
        if (isBranchExcluded(change.getName())) {
@@ -380,7 +380,7 @@
     */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ModifyRequest change) throws IOException {
        Validator.ensureNotNull(change);
        Reject.ifNull(change);
        // If there aren't any modifications, then there's nothing to do.
        if (change.getModifications().isEmpty()) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFEntryReader.java
@@ -53,7 +53,7 @@
import org.forgerock.opendj.ldap.schema.Schema;
import org.forgerock.opendj.ldap.schema.SchemaValidationPolicy;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDIF entry reader reads attribute value records (entries) using the LDAP
@@ -241,7 +241,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setExcludeAttribute(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        excludeAttributes.add(attributeDescription);
        return this;
    }
@@ -256,7 +256,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setExcludeBranch(final DN excludeBranch) {
        Validator.ensureNotNull(excludeBranch);
        Reject.ifNull(excludeBranch);
        excludeBranches.add(excludeBranch);
        return this;
    }
@@ -271,7 +271,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setExcludeFilter(final Matcher excludeFilter) {
        Validator.ensureNotNull(excludeFilter);
        Reject.ifNull(excludeFilter);
        excludeFilters.add(excludeFilter);
        return this;
    }
@@ -286,7 +286,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setIncludeAttribute(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        includeAttributes.add(attributeDescription);
        return this;
    }
@@ -301,7 +301,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setIncludeBranch(final DN includeBranch) {
        Validator.ensureNotNull(includeBranch);
        Reject.ifNull(includeBranch);
        includeBranches.add(includeBranch);
        return this;
    }
@@ -316,7 +316,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setIncludeFilter(final Matcher includeFilter) {
        Validator.ensureNotNull(includeFilter);
        Reject.ifNull(includeFilter);
        includeFilters.add(includeFilter);
        return this;
    }
@@ -346,7 +346,7 @@
     * @return A reference to this {@code LDIFEntryReader}.
     */
    public LDIFEntryReader setSchema(final Schema schema) {
        Validator.ensureNotNull(schema);
        Reject.ifNull(schema);
        this.schema = schemaValidationPolicy.adaptSchemaForValidation(schema);
        return this;
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFEntryWriter.java
@@ -40,7 +40,7 @@
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.Matcher;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * An LDIF entry writer writes attribute value records (entries) using the LDAP
@@ -171,7 +171,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setExcludeAttribute(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        excludeAttributes.add(attributeDescription);
        return this;
    }
@@ -186,7 +186,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setExcludeBranch(final DN excludeBranch) {
        Validator.ensureNotNull(excludeBranch);
        Reject.ifNull(excludeBranch);
        excludeBranches.add(excludeBranch);
        return this;
    }
@@ -201,7 +201,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setExcludeFilter(final Matcher excludeFilter) {
        Validator.ensureNotNull(excludeFilter);
        Reject.ifNull(excludeFilter);
        excludeFilters.add(excludeFilter);
        return this;
    }
@@ -216,7 +216,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setIncludeAttribute(final AttributeDescription attributeDescription) {
        Validator.ensureNotNull(attributeDescription);
        Reject.ifNull(attributeDescription);
        includeAttributes.add(attributeDescription);
        return this;
    }
@@ -231,7 +231,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setIncludeBranch(final DN includeBranch) {
        Validator.ensureNotNull(includeBranch);
        Reject.ifNull(includeBranch);
        includeBranches.add(includeBranch);
        return this;
    }
@@ -246,7 +246,7 @@
     * @return A reference to this {@code LDIFEntryWriter}.
     */
    public LDIFEntryWriter setIncludeFilter(final Matcher includeFilter) {
        Validator.ensureNotNull(includeFilter);
        Reject.ifNull(includeFilter);
        includeFilters.add(includeFilter);
        return this;
    }
@@ -279,7 +279,7 @@
     */
    @Override
    public LDIFEntryWriter writeEntry(final Entry entry) throws IOException {
        Validator.ensureNotNull(entry);
        Reject.ifNull(entry);
        // Skip if branch containing the entry is excluded.
        if (isBranchExcluded(entry.getName())) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java
@@ -79,10 +79,10 @@
import org.forgerock.opendj.ldif.TemplateTag.TagResult;
import org.forgerock.opendj.ldif.TemplateTag.UnderscoreDNTag;
import org.forgerock.opendj.ldif.TemplateTag.UnderscoreParentDNTag;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.Pair;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
/**
 * A template file allow to generate entries from a collection of constant
@@ -202,7 +202,8 @@
     */
    TemplateFile(Schema schema, Map<String, String> constants, String resourcePath, Random random)
            throws IOException {
        Validator.ensureNotNull(schema, random);
        Reject.ifNull(schema);
        Reject.ifNull(random);
        this.schema = schema;
        this.constants = constants != null ? constants : new HashMap<String, String>();
        this.resourcePath = resourcePath;
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnection.java
@@ -90,7 +90,7 @@
import org.glassfish.grizzly.ssl.SSLFilter;
import com.forgerock.opendj.util.CompletedFutureResult;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * LDAP connection implementation.
@@ -239,7 +239,7 @@
    @Override
    public void addConnectionEventListener(final ConnectionEventListener listener) {
        Validator.ensureNotNull(listener);
        Reject.ifNull(listener);
        final boolean notifyClose;
        final boolean notifyErrorOccurred;
        synchronized (stateLock) {
@@ -334,7 +334,7 @@
    @Override
    public void close(final UnbindRequest request, final String reason) {
        // FIXME: I18N need to internationalize this message.
        Validator.ensureNotNull(request);
        Reject.ifNull(request);
        close(request, false, Responses.newResult(ResultCode.CLIENT_SIDE_USER_CANCELLED)
                .setDiagnosticMessage(reason != null ? reason : "Connection closed by client"));
    }
@@ -536,7 +536,7 @@
    @Override
    public void removeConnectionEventListener(final ConnectionEventListener listener) {
        Validator.ensureNotNull(listener);
        Reject.ifNull(listener);
        synchronized (stateLock) {
            if (listeners != null) {
                listeners.remove(listener);
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/LDAPServerFilter.java
@@ -83,7 +83,7 @@
import org.glassfish.grizzly.ssl.SSLFilter;
import org.glassfish.grizzly.ssl.SSLUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * Grizzly filter implementation for decoding LDAP requests and handling server
@@ -255,7 +255,7 @@
        @Override
        public void disconnect(final ResultCode resultCode, final String message) {
            Validator.ensureNotNull(resultCode);
            Reject.ifNull(resultCode);
            final GenericExtendedResult notification =
                    Responses.newGenericExtendedResult(resultCode).setOID(
                            LDAP.OID_NOTICE_OF_DISCONNECTION).setDiagnosticMessage(message);
@@ -274,7 +274,7 @@
        @Override
        public void enableTLS(final SSLContext sslContext, final String[] protocols,
                final String[] suites, final boolean wantClientAuth, final boolean needClientAuth) {
            Validator.ensureNotNull(sslContext);
            Reject.ifNull(sslContext);
            synchronized (this) {
                if (isTLSEnabled()) {
                    throw new IllegalStateException("TLS already enabled");
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java
@@ -36,10 +36,10 @@
import org.forgerock.opendj.ldap.ResultHandler;
import org.forgerock.opendj.ldap.requests.BindRequest;
import org.forgerock.opendj.ldap.responses.BindResult;
import org.forgerock.util.Reject;
import com.forgerock.opendj.util.FutureResultTransformer;
import com.forgerock.opendj.util.RecursiveFutureResult;
import com.forgerock.opendj.util.Validator;
/**
 * An authenticated connection factory can be used to create pre-authenticated
@@ -239,7 +239,8 @@
     *             If {@code factory} or {@code request} was {@code null}.
     */
    AuthenticatedConnectionFactory(final ConnectionFactory factory, final BindRequest request) {
        Validator.ensureNotNull(factory, request);
        Reject.ifNull(factory);
        Reject.ifNull(request);
        this.parentFactory = factory;
        // FIXME: should do a defensive copy.
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/DataSource.java
@@ -38,7 +38,7 @@
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A source of data for performance tools.
@@ -279,7 +279,7 @@
     *             If an exception occurs while parsing.
     */
    public static DataSource[] parse(final List<String> sources) throws ArgumentException {
        Validator.ensureNotNull(sources);
        Reject.ifNull(sources);
        final DataSource[] dataSources = new DataSource[sources.size()];
        for (int i = 0; i < sources.size(); i++) {
            final String dataSourceDef = sources.get(i);
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java
@@ -48,8 +48,7 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import com.forgerock.opendj.util.Validator;
import org.forgerock.util.Reject;
/**
 * A trust manager which prompts the user for the length of time that they would
@@ -123,7 +122,8 @@
    PromptingTrustManager(final ConsoleApplication app, final String acceptedStorePath,
            final X509TrustManager sourceTrustManager) throws KeyStoreException, IOException,
            NoSuchAlgorithmException, CertificateException {
        Validator.ensureNotNull(app, acceptedStorePath);
        Reject.ifNull(app);
        Reject.ifNull(acceptedStorePath);
        this.app = app;
        this.nestedTrustManager = sourceTrustManager;
        inMemoryTrustStore = KeyStore.getInstance(KeyStore.getDefaultType());
opendj-sdk/pom.xml
@@ -397,6 +397,11 @@
        <artifactId>slf4j-jdk14</artifactId>
        <version>${slf4jVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.forgerock.commons</groupId>
        <artifactId>forgerock-util</artifactId>
        <version>1.2.0-SNAPSHOT</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>