From eb81bffaf56253ca752c7ab5005eddfc961731b2 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 19 Dec 2013 16:34:56 +0000
Subject: [PATCH] Minor cleanup: combine multiple Reject.ifNull() calls if possible into varargs calls.
---
opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java | 12 +--
opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java | 8 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java | 6 -
opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java | 7 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java | 6 -
opendj-server/src/main/java/org/forgerock/opendj/server/core/DataProviderEvent.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java | 3
opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java | 6 -
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java | 6 -
opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java | 4
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java | 4
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java | 3
opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java | 3
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java | 3
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java | 3
opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java | 7 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java | 28 ++-----
opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java | 6 -
opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java | 11 --
opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java | 3
45 files changed, 67 insertions(+), 155 deletions(-)
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java b/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
index eb485fb..00d8d9f 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
@@ -247,8 +247,7 @@
*/
public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf)
throws IllegalPropertyValueException, ClassCastException {
- Reject.ifNull(className);
- Reject.ifNull(instanceOf);
+ Reject.ifNull(className, instanceOf);
// Make sure that the named class is valid.
validateClassName(className);
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java b/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java
index aaff666..d2ab415 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/PropertyDefinition.java
@@ -193,12 +193,7 @@
*/
protected PropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, Class<T> theClass, String propertyName,
EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<T> defaultBehavior) {
- Reject.ifNull(d);
- Reject.ifNull(theClass);
- Reject.ifNull(propertyName);
- Reject.ifNull(options);
- Reject.ifNull(adminAction);
- Reject.ifNull(defaultBehavior);
+ Reject.ifNull(d, theClass, propertyName, options, adminAction, defaultBehavior);
this.definition = d;
this.theClass = theClass;
diff --git a/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java b/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
index c0540e0..54f8f56 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/condition/ContainsCondition.java
@@ -111,8 +111,7 @@
* The string representation of the required property value.
*/
public ContainsCondition(String propertyName, String stringValue) {
- Reject.ifNull(propertyName);
- Reject.ifNull(stringValue);
+ Reject.ifNull(propertyName, stringValue);
this.propertyName = propertyName;
this.propertyStringValue = stringValue;
}
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java b/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
index 46209be..9e4bb9b 100644
--- a/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
+++ b/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
@@ -1772,8 +1772,7 @@
* If {@code c} or {@code separator} were {@code null}.
*/
public static String joinCollection(Collection<?> c, String separator) {
- Reject.ifNull(c);
- Reject.ifNull(separator);
+ Reject.ifNull(c, separator);
switch (c.size()) {
case 0:
@@ -2055,8 +2054,7 @@
* @return The updated {@code StringBuilder}.
*/
public static StringBuilder toLowerCase(final ByteSequence b, final StringBuilder builder) {
- Reject.ifNull(b);
- Reject.ifNull(builder);
+ Reject.ifNull(b, builder);
// FIXME: What locale should we use for non-ASCII characters? I
// think we should use default to the Unicode StringPrep.
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java b/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java
index 95f8933..9db5ef7 100644
--- a/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java
+++ b/opendj-core/src/main/java/com/forgerock/opendj/util/StringPrepProfile.java
@@ -452,8 +452,7 @@
*/
public static void prepareUnicode(final StringBuilder buffer, final ByteSequence sequence,
final boolean trim, final boolean foldCase) {
- Reject.ifNull(buffer);
- Reject.ifNull(sequence);
+ Reject.ifNull(buffer, sequence);
// Optimize in the case of purely ascii characters which is the most
// common case.
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java
index d3210c2..5485cb7 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AVA.java
@@ -607,8 +607,7 @@
* {@code null}.
*/
public AVA(final AttributeType attributeType, final Object attributeValue) {
- Reject.ifNull(attributeType);
- Reject.ifNull(attributeValue);
+ Reject.ifNull(attributeType, attributeValue);
this.attributeType = attributeType;
this.attributeValue = ByteString.valueOf(attributeValue);
@@ -632,8 +631,7 @@
* {@code null}.
*/
public AVA(final String attributeType, final Object attributeValue) {
- Reject.ifNull(attributeType);
- Reject.ifNull(attributeValue);
+ Reject.ifNull(attributeType, attributeValue);
this.attributeType = Schema.getDefaultSchema().getAttributeType(attributeType);
this.attributeValue = ByteString.valueOf(attributeValue);
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java
index 76255d5..2629a53 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java
@@ -497,8 +497,7 @@
public Result search(final SearchRequest request,
final Collection<? super SearchResultEntry> entries,
final Collection<? super SearchResultReference> references) throws ErrorResultException {
- Reject.ifNull(request);
- Reject.ifNull(entries);
+ Reject.ifNull(request, entries);
// FIXME: does this need to be thread safe?
final SearchResultHandler handler = new SearchResultHandler() {
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java
index 4d60076..2224207 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractLoadBalancingAlgorithm.java
@@ -282,8 +282,7 @@
AbstractLoadBalancingAlgorithm(final Collection<? extends ConnectionFactory> factories,
final LoadBalancerEventListener listener, final long interval, final TimeUnit unit,
final ScheduledExecutorService scheduler) {
- Reject.ifNull(factories);
- Reject.ifNull(unit);
+ Reject.ifNull(factories, unit);
this.monitoredFactories = new ArrayList<MonitoredConnectionFactory>(factories.size());
int i = 0;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
index 4423f96..0e2c1be 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeDescription.java
@@ -580,8 +580,7 @@
* If {@code attributeType} or {@code option} was {@code null}.
*/
public static AttributeDescription create(final AttributeType attributeType, final String option) {
- Reject.ifNull(attributeType);
- Reject.ifNull(option);
+ Reject.ifNull(attributeType, option);
final String oid = attributeType.getNameOrOID();
final StringBuilder builder = new StringBuilder(oid.length() + option.length() + 1);
@@ -697,8 +696,7 @@
@SuppressWarnings("serial")
public static AttributeDescription valueOf(final String attributeDescription,
final Schema schema) {
- Reject.ifNull(attributeDescription);
- Reject.ifNull(schema);
+ Reject.ifNull(attributeDescription, schema);
// First look up the attribute description in the cache.
final WeakHashMap<Schema, Map<String, AttributeDescription>> threadLocalMap = CACHE.get();
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java
index f1a5e9b..ee8db66 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Attributes.java
@@ -495,8 +495,7 @@
*/
public static final Attribute renameAttribute(final Attribute attribute,
final AttributeDescription attributeDescription) {
- Reject.ifNull(attribute);
- Reject.ifNull(attributeDescription);
+ Reject.ifNull(attribute, attributeDescription);
// Optimize for the case where no renaming is required.
if (attribute.getAttributeDescription() == attributeDescription) {
@@ -526,8 +525,7 @@
*/
public static final Attribute renameAttribute(final Attribute attribute,
final String attributeDescription) {
- Reject.ifNull(attribute);
- Reject.ifNull(attributeDescription);
+ Reject.ifNull(attribute, attributeDescription);
return renameAttribute(attribute, AttributeDescription.valueOf(attributeDescription));
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java
index f6c5cf1..6598284 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Connections.java
@@ -65,8 +65,7 @@
*/
public static ConnectionFactory newAuthenticatedConnectionFactory(
final ConnectionFactory factory, final BindRequest request) {
- Reject.ifNull(factory);
- Reject.ifNull(request);
+ Reject.ifNull(factory, request);
return new AuthenticatedConnectionFactory(factory, request);
}
@@ -531,8 +530,7 @@
*/
public static ConnectionFactory newNamedConnectionFactory(final ConnectionFactory factory,
final String name) {
- Reject.ifNull(factory);
- Reject.ifNull(name);
+ Reject.ifNull(factory, name);
return new ConnectionFactory() {
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
index 4b4103b..58cd314 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
@@ -237,8 +237,7 @@
* @see #format(String, Schema, Object...)
*/
public static DN valueOf(final String dn, final Schema schema) {
- Reject.ifNull(dn);
- Reject.ifNull(schema);
+ Reject.ifNull(dn, schema);
if (dn.length() == 0) {
return ROOT_DN;
}
@@ -872,8 +871,7 @@
* If {@code fromDN} or {@code toDN} was {@code null}.
*/
public DN rename(final DN fromDN, final DN toDN) {
- Reject.ifNull(fromDN);
- Reject.ifNull(toDN);
+ Reject.ifNull(fromDN, toDN);
if (!isSubordinateOrEqualTo(fromDN)) {
return this;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
index a49ee9e..a8f1698 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
@@ -429,8 +429,7 @@
* @see Requests#newModifyRequest(Entry, Entry)
*/
public static ModifyRequest diffEntries(final Entry fromEntry, final Entry toEntry) {
- Reject.ifNull(fromEntry);
- Reject.ifNull(toEntry);
+ Reject.ifNull(fromEntry, toEntry);
final ModifyRequest request = Requests.newModifyRequest(fromEntry.getName());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java
index a0fb5f1..a4001a1 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Filter.java
@@ -522,8 +522,7 @@
* @return The newly created {@code approximate match} filter.
*/
public static Filter approx(final String attributeDescription, final Object assertionValue) {
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(attributeDescription, assertionValue);
return new Filter(new ApproxMatchImpl(attributeDescription, ByteString
.valueOf(assertionValue)));
}
@@ -542,8 +541,7 @@
* @return The newly created {@code equality match} filter.
*/
public static Filter equality(final String attributeDescription, final Object assertionValue) {
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(attributeDescription, assertionValue);
return new Filter(new EqualityMatchImpl(attributeDescription, ByteString
.valueOf(assertionValue)));
}
@@ -634,8 +632,7 @@
*/
public static Filter greaterOrEqual(final String attributeDescription,
final Object assertionValue) {
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(attributeDescription, assertionValue);
return new Filter(new GreaterOrEqualImpl(attributeDescription, ByteString
.valueOf(assertionValue)));
}
@@ -679,8 +676,7 @@
* @return The newly created {@code less or equal} filter.
*/
public static Filter lessOrEqual(final String attributeDescription, final Object assertionValue) {
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(attributeDescription, assertionValue);
return new Filter(new LessOrEqualImpl(attributeDescription, ByteString
.valueOf(assertionValue)));
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java
index 3e94aa8..270c7b5 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java
@@ -1174,8 +1174,7 @@
HeartBeatConnectionFactory(final ConnectionFactory factory, final long interval,
final long timeout, final TimeUnit unit, final SearchRequest heartBeat,
final ScheduledExecutorService scheduler) {
- Reject.ifNull(factory);
- Reject.ifNull(unit);
+ Reject.ifNull(factory, unit);
Reject.ifFalse(interval >= 0, "negative interval");
Reject.ifFalse(timeout >= 0, "negative timeout");
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java
index bd44830..d4e59fe 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/KeyManagers.java
@@ -312,8 +312,7 @@
*/
public static X509KeyManager useSingleCertificate(final String alias,
final X509KeyManager keyManager) {
- Reject.ifNull(alias);
- Reject.ifNull(keyManager);
+ Reject.ifNull(alias, keyManager);
return new SelectCertificate(keyManager, alias);
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java
index 1da2901..76e86e5 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPConnectionFactory.java
@@ -82,8 +82,7 @@
* provider requested using options is not found.
*/
public LDAPConnectionFactory(final SocketAddress address, final LDAPOptions options) {
- Reject.ifNull(address);
- Reject.ifNull(options);
+ Reject.ifNull(address, options);
this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
options.getProviderClassLoader());
this.impl = provider.getLDAPConnectionFactory(address, options);
@@ -124,8 +123,7 @@
* provider requested using options is not found.
*/
public LDAPConnectionFactory(final String host, final int port, final LDAPOptions options) {
- Reject.ifNull(host);
- Reject.ifNull(options);
+ Reject.ifNull(host, options);
final SocketAddress address = new InetSocketAddress(host, port);
this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
options.getProviderClassLoader());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java
index 33ccb17..e369b5f 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPListener.java
@@ -144,8 +144,7 @@
public LDAPListener(final int port,
final ServerConnectionFactory<LDAPClientContext, Integer> factory,
final LDAPListenerOptions options) throws IOException {
- Reject.ifNull(factory);
- Reject.ifNull(options);
+ Reject.ifNull(factory, options);
final SocketAddress address = new InetSocketAddress(port);
this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
options.getProviderClassLoader());
@@ -193,9 +192,7 @@
public LDAPListener(final SocketAddress address,
final ServerConnectionFactory<LDAPClientContext, Integer> factory,
final LDAPListenerOptions options) throws IOException {
- Reject.ifNull(address);
- Reject.ifNull(factory);
- Reject.ifNull(options);
+ Reject.ifNull(address, factory, options);
this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
options.getProviderClassLoader());
this.impl = provider.getLDAPListener(address, factory, options);
@@ -246,9 +243,7 @@
public LDAPListener(final String host, final int port,
final ServerConnectionFactory<LDAPClientContext, Integer> factory,
final LDAPListenerOptions options) throws IOException {
- Reject.ifNull(host);
- Reject.ifNull(factory);
- Reject.ifNull(options);
+ Reject.ifNull(host, factory, options);
final SocketAddress address = new InetSocketAddress(host, port);
this.provider = getProvider(TransportProvider.class, options.getTransportProvider(),
options.getProviderClassLoader());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java
index da9e113..cb86ec6 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java
@@ -266,8 +266,7 @@
* If {@code url} or {@code schema} was {@code null}.
*/
public static LDAPUrl valueOf(final String url, final Schema schema) {
- Reject.ifNull(url);
- Reject.ifNull(schema);
+ Reject.ifNull(url, schema);
return new LDAPUrl(url, schema);
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java
index dd03e9a..c701f4b 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java
@@ -53,8 +53,7 @@
* The the attribute containing the values to be modified.
*/
public Modification(final ModificationType modificationType, final Attribute attribute) {
- Reject.ifNull(modificationType);
- Reject.ifNull(attribute);
+ Reject.ifNull(modificationType, attribute);
this.modificationType = modificationType;
this.attribute = attribute;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java
index 179e75c..770a9cb 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/SortKey.java
@@ -191,8 +191,7 @@
* If {@code schema} or {@code keys} was {@code null}.
*/
public static Comparator<Entry> comparator(final Schema schema, final Collection<SortKey> keys) {
- Reject.ifNull(schema);
- Reject.ifNull(keys);
+ Reject.ifNull(schema, keys);
Reject.ifFalse(!keys.isEmpty(), "keys must not be empty");
final List<Comparator<Entry>> comparators = new ArrayList<Comparator<Entry>>(keys.size());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java
index 7f3ee6a..3477680 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/TrustManagers.java
@@ -290,8 +290,7 @@
*/
public static X509TrustManager checkHostName(final String hostNamePattern,
final X509TrustManager trustManager) {
- Reject.ifNull(trustManager);
- Reject.ifNull(hostNamePattern);
+ Reject.ifNull(trustManager, hostNamePattern);
return new CheckHostName(trustManager, hostNamePattern);
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java
index a1cb118..cc04c30 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java
@@ -107,8 +107,7 @@
public EntryChangeNotificationResponseControl decodeControl(final Control control,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(control);
- Reject.ifNull(options);
+ Reject.ifNull(control, options);
if (control instanceof EntryChangeNotificationResponseControl) {
return (EntryChangeNotificationResponseControl) control;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java
index 7216981..ccd816d 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ServerSideSortResponseControl.java
@@ -96,8 +96,7 @@
public ServerSideSortResponseControl decodeControl(final Control control,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(control);
- Reject.ifNull(options);
+ Reject.ifNull(control, options);
if (control instanceof ServerSideSortResponseControl) {
return (ServerSideSortResponseControl) control;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java
index 76a025c..fbeae81 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractRequestImpl.java
@@ -87,8 +87,7 @@
@Override
public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(decoder);
- Reject.ifNull(options);
+ Reject.ifNull(decoder, options);
final Control control = getControl(controls, decoder.getOID());
return control != null ? decoder.decodeControl(control, options) : null;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java
index d8ea81d..64d23c6 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableRequest.java
@@ -68,8 +68,7 @@
@Override
public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(decoder);
- Reject.ifNull(options);
+ Reject.ifNull(decoder, options);
final List<Control> controls = impl.getControls();
final Control control = AbstractRequestImpl.getControl(controls, decoder.getOID());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java
index 05b77bd..e42009b 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/CRAMMD5SASLBindRequestImpl.java
@@ -127,8 +127,7 @@
}
CRAMMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) {
- Reject.ifNull(authenticationID);
- Reject.ifNull(password);
+ Reject.ifNull(authenticationID, password);
this.authenticationID = authenticationID;
this.password = password;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java
index 8d25bad..dd81032 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/DigestMD5SASLBindRequestImpl.java
@@ -253,16 +253,14 @@
}
DigestMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) {
- Reject.ifNull(authenticationID);
- Reject.ifNull(password);
+ Reject.ifNull(authenticationID, password);
this.authenticationID = authenticationID;
this.password = password;
}
@Override
public DigestMD5SASLBindRequest addAdditionalAuthParam(final String name, final String value) {
- Reject.ifNull(name);
- Reject.ifNull(value);
+ Reject.ifNull(name, value);
additionalAuthParams.put(name, value);
return this;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java
index 4bcc623..5837b5a 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/GSSAPISASLBindRequestImpl.java
@@ -339,8 +339,7 @@
}
GSSAPISASLBindRequestImpl(final String authenticationID, final byte[] password) {
- Reject.ifNull(authenticationID);
- Reject.ifNull(password);
+ Reject.ifNull(authenticationID, password);
this.authenticationID = authenticationID;
this.password = password;
}
@@ -352,8 +351,7 @@
@Override
public GSSAPISASLBindRequest addAdditionalAuthParam(final String name, final String value) {
- Reject.ifNull(name);
- Reject.ifNull(value);
+ Reject.ifNull(name, value);
additionalAuthParams.put(name, value);
return this;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java
index 4606918..973dffc 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/ModifyRequestImpl.java
@@ -77,8 +77,7 @@
@Override
public ModifyRequest addModification(final ModificationType type,
final String attributeDescription, final Object... values) {
- Reject.ifNull(type);
- Reject.ifNull(attributeDescription);
+ Reject.ifNull(type, attributeDescription);
Reject.ifNull(values);
changes.add(new Modification(type, new LinkedAttribute(attributeDescription, values)));
return this;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java
index d9c2989..f760ec7 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/PlainSASLBindRequestImpl.java
@@ -115,8 +115,7 @@
}
PlainSASLBindRequestImpl(final String authenticationID, final byte[] password) {
- Reject.ifNull(authenticationID);
- Reject.ifNull(password);
+ Reject.ifNull(authenticationID, password);
this.authenticationID = authenticationID;
this.password = password;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java
index 18ae428..d7cd6af 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java
@@ -528,9 +528,7 @@
*/
public static CompareRequest newCompareRequest(final DN name,
final AttributeDescription attributeDescription, final Object assertionValue) {
- Reject.ifNull(name);
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(name, attributeDescription, assertionValue);
return new CompareRequestImpl(name, attributeDescription, ByteString
.valueOf(assertionValue));
}
@@ -558,9 +556,7 @@
*/
public static CompareRequest newCompareRequest(final String name,
final String attributeDescription, final Object assertionValue) {
- Reject.ifNull(name);
- Reject.ifNull(attributeDescription);
- Reject.ifNull(assertionValue);
+ Reject.ifNull(name, attributeDescription, assertionValue);
return new CompareRequestImpl(DN.valueOf(name), AttributeDescription
.valueOf(attributeDescription), ByteString.valueOf(assertionValue));
}
@@ -736,8 +732,7 @@
*/
public static GenericBindRequest newGenericBindRequest(final String name,
final byte authenticationType, final byte[] authenticationValue) {
- Reject.ifNull(name);
- Reject.ifNull(authenticationValue);
+ Reject.ifNull(name, authenticationValue);
return new GenericBindRequestImpl(name, authenticationType, authenticationValue);
}
@@ -872,8 +867,7 @@
* If {@code name} or {@code newRDN} was {@code null}.
*/
public static ModifyDNRequest newModifyDNRequest(final String name, final String newRDN) {
- Reject.ifNull(name);
- Reject.ifNull(newRDN);
+ Reject.ifNull(name, newRDN);
return new ModifyDNRequestImpl(DN.valueOf(name), RDN.valueOf(newRDN));
}
@@ -1042,9 +1036,7 @@
*/
public static SearchRequest newSearchRequest(final DN name, final SearchScope scope,
final Filter filter, final String... attributeDescriptions) {
- Reject.ifNull(name);
- Reject.ifNull(scope);
- Reject.ifNull(filter);
+ Reject.ifNull(name, scope, filter);
final SearchRequest request = new SearchRequestImpl(name, scope, filter);
for (final String attributeDescription : attributeDescriptions) {
request.addAttribute(attributeDescription);
@@ -1077,9 +1069,7 @@
*/
public static SearchRequest newSearchRequest(final String name, final SearchScope scope,
final String filter, final String... attributeDescriptions) {
- Reject.ifNull(name);
- Reject.ifNull(scope);
- Reject.ifNull(filter);
+ Reject.ifNull(name, scope, filter);
final SearchRequest request =
new SearchRequestImpl(DN.valueOf(name), scope, Filter.valueOf(filter));
for (final String attributeDescription : attributeDescriptions) {
@@ -1171,8 +1161,7 @@
* If {@code name} or {@code password} was {@code null}.
*/
public static SimpleBindRequest newSimpleBindRequest(final String name, final byte[] password) {
- Reject.ifNull(name);
- Reject.ifNull(password);
+ Reject.ifNull(name, password);
return new SimpleBindRequestImpl(name, password);
}
@@ -1198,8 +1187,7 @@
* If {@code name} or {@code password} was {@code null}.
*/
public static SimpleBindRequest newSimpleBindRequest(final String name, final char[] password) {
- Reject.ifNull(name);
- Reject.ifNull(password);
+ Reject.ifNull(name, password);
return new SimpleBindRequestImpl(name, getBytes(password));
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java
index bd25753..3c225e2 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractResponseImpl.java
@@ -86,8 +86,7 @@
@Override
public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(decoder);
- Reject.ifNull(options);
+ Reject.ifNull(decoder, options);
final Control control = getControl(controls, decoder.getOID());
return control != null ? decoder.decodeControl(control, options) : null;
}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java
index af8270f..4a47f78 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableResponseImpl.java
@@ -69,8 +69,7 @@
@Override
public final <C extends Control> C getControl(final ControlDecoder<C> decoder,
final DecodeOptions options) throws DecodeException {
- Reject.ifNull(decoder);
- Reject.ifNull(options);
+ Reject.ifNull(decoder, options);
final List<Control> controls = impl.getControls();
final Control control = AbstractResponseImpl.getControl(controls, decoder.getOID());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
index 586b029..5b00efb 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
@@ -136,12 +136,8 @@
final String definition) {
super(description, extraProperties, definition);
- Reject.ifNull(oid);
- Reject.ifNull(names);
- Reject.ifNull(description);
- Reject.ifNull(attributeUsage);
+ Reject.ifNull(oid, names, attributeUsage);
Reject.ifFalse(superiorType != null || syntax != null, "superiorType and/or syntax must not be null");
- Reject.ifNull(extraProperties);
this.oid = oid;
this.names = names;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
index 01e9481..0ce8719 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
@@ -82,12 +82,8 @@
final Map<String, List<String>> extraProperties, final String definition) {
super(description, extraProperties, definition);
- Reject.ifNull(structuralClassOID);
- Reject.ifNull(names);
- Reject.ifNull(auxiliaryClassOIDs);
- Reject.ifNull(optionalAttributeOIDs);
- Reject.ifNull(prohibitedAttributeOIDs);
- Reject.ifNull(requiredAttributeOIDs);
+ Reject.ifNull(structuralClassOID, names, auxiliaryClassOIDs, optionalAttributeOIDs, prohibitedAttributeOIDs,
+ requiredAttributeOIDs);
this.names = names;
this.isObsolete = obsolete;
this.structuralClassOID = structuralClassOID;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
index c48cd55..13e7cd1 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
@@ -74,9 +74,7 @@
final Map<String, List<String>> extraProperties, final String definition) {
super(description, extraProperties, definition);
- Reject.ifNull(ruleID);
- Reject.ifNull(nameFormOID);
- Reject.ifNull(superiorRuleIDs);
+ Reject.ifNull(ruleID, nameFormOID, superiorRuleIDs);
this.ruleID = ruleID;
this.names = names;
this.isObsolete = obsolete;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java
index 3461bc6..0194f85 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/EnumSyntaxImpl.java
@@ -56,8 +56,7 @@
private final List<String> entries;
EnumSyntaxImpl(final String oid, final List<String> entries) {
- Reject.ifNull(oid);
- Reject.ifNull(entries);
+ Reject.ifNull(oid, entries);
this.oid = oid;
final List<String> entryStrings = new ArrayList<String>(entries.size());
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java
index 45031c9..32116dc 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java
@@ -67,9 +67,7 @@
final Map<String, List<String>> extraProperties, final String definition) {
super(description, extraProperties, definition);
- Reject.ifNull(oid);
- Reject.ifNull(names);
- Reject.ifNull(attributeOIDs);
+ Reject.ifNull(oid, names, attributeOIDs);
this.oid = oid;
this.names = names;
this.isObsolete = obsolete;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
index e3968ab..89e46d4 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -91,12 +91,7 @@
final String definition) {
super(description, extraProperties, definition);
- Reject.ifNull(oid);
- Reject.ifNull(names);
- Reject.ifNull(superiorClassOIDs);
- Reject.ifNull(requiredAttributeOIDs);
- Reject.ifNull(optionalAttributeOIDs);
- Reject.ifNull(objectClassType);
+ Reject.ifNull(oid, names, superiorClassOIDs, requiredAttributeOIDs, optionalAttributeOIDs, objectClassType);
this.oid = oid;
this.names = names;
this.isObsolete = obsolete;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java
index 125c97d..80661b1 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java
@@ -210,8 +210,7 @@
SchemaElement(final String description, final Map<String, List<String>> extraProperties,
final String definition) {
- Reject.ifNull(description);
- Reject.ifNull(extraProperties);
+ Reject.ifNull(description, extraProperties);
this.description = description;
this.extraProperties = extraProperties; // Should already be unmodifiable.
this.definition = definition;
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java b/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java
index 2356ec3..4ca31ae 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldif/TemplateFile.java
@@ -202,8 +202,7 @@
*/
TemplateFile(Schema schema, Map<String, String> constants, String resourcePath, Random random)
throws IOException {
- Reject.ifNull(schema);
- Reject.ifNull(random);
+ Reject.ifNull(schema, random);
this.schema = schema;
this.constants = constants != null ? constants : new HashMap<String, String>();
this.resourcePath = resourcePath;
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java
index fdb0328..bf14766 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthenticatedConnectionFactory.java
@@ -239,8 +239,7 @@
* If {@code factory} or {@code request} was {@code null}.
*/
AuthenticatedConnectionFactory(final ConnectionFactory factory, final BindRequest request) {
- Reject.ifNull(factory);
- Reject.ifNull(request);
+ Reject.ifNull(factory, request);
this.parentFactory = factory;
// FIXME: should do a defensive copy.
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java
index 0bcba9d..182fcd7 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PromptingTrustManager.java
@@ -122,8 +122,7 @@
PromptingTrustManager(final ConsoleApplication app, final String acceptedStorePath,
final X509TrustManager sourceTrustManager) throws KeyStoreException, IOException,
NoSuchAlgorithmException, CertificateException {
- Reject.ifNull(app);
- Reject.ifNull(acceptedStorePath);
+ Reject.ifNull(app, acceptedStorePath);
this.app = app;
this.nestedTrustManager = sourceTrustManager;
inMemoryTrustStore = KeyStore.getInstance(KeyStore.getDefaultType());
diff --git a/opendj-server/src/main/java/org/forgerock/opendj/server/core/DataProviderEvent.java b/opendj-server/src/main/java/org/forgerock/opendj/server/core/DataProviderEvent.java
index a3fa387..434d13d 100644
--- a/opendj-server/src/main/java/org/forgerock/opendj/server/core/DataProviderEvent.java
+++ b/opendj-server/src/main/java/org/forgerock/opendj/server/core/DataProviderEvent.java
@@ -83,8 +83,7 @@
* The types of event that have occurred in the data provider.
*/
public DataProviderEvent(final LocalizableMessage reason, final Set<Type> types) {
- Reject.ifNull(reason);
- Reject.ifNull(types);
+ Reject.ifNull(reason, types);
Reject.ifTrue(types.isEmpty());
this.reason = reason;
--
Gitblit v1.10.0