From 01bf9b6a5d324d45355659581e9ebbd1280834fe Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 25 Apr 2016 14:41:26 +0000
Subject: [PATCH] Improvements suggested by UCDetector: remove dead code, add final keywords, change visibilities
---
opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/Requests.java | 43 +------------------------------------------
1 files changed, 1 insertions(+), 42 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/Requests.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/Requests.java
index e7f4083..80beca1 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/Requests.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/Requests.java
@@ -17,10 +17,9 @@
package org.opends.server.protocols.internal;
-import org.forgerock.i18n.LocalizedIllegalArgumentException;
+import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.util.Reject;
-import org.forgerock.opendj.ldap.DN;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.SearchFilter;
@@ -78,46 +77,6 @@
}
/**
- * Creates a new search request using the provided distinguished name,
- * scope, and filter, decoded using the default schema.
- *
- * @param name
- * The distinguished name of the base entry relative to which the
- * search is to be performed.
- * @param scope
- * The scope of the search.
- * @param filter
- * The filter that defines the conditions that must be fulfilled
- * in order for an entry to be returned.
- * @param attributeDescriptions
- * The names of the attributes to be included with each entry.
- * @return The new search request.
- * @throws DirectoryException
- * If a problem occurs while decoding the provided string as a
- * search filter.
- * @throws LocalizedIllegalArgumentException
- * If {@code name} could not be decoded using the default
- * schema, or if {@code filter} is not a valid LDAP string
- * representation of a filter.
- * @throws NullPointerException
- * If the {@code name}, {@code scope}, or {@code filter} were
- * {@code null}.
- */
- public static SearchRequest newSearchRequest(final String name, final SearchScope scope,
- final String filter, final String... attributeDescriptions)
- throws NullPointerException, LocalizedIllegalArgumentException, DirectoryException {
- Reject.ifNull(name, scope, filter);
- SearchFilter f = "(objectclass=*)".equals(filter.toLowerCase())
- ? SearchFilter.objectClassPresent()
- : SearchFilter.createFilterFromString(filter);
- final SearchRequest request = new SearchRequest(DN.valueOf(name), scope, f);
- for (final String attributeDescription : attributeDescriptions) {
- request.addAttribute(attributeDescription);
- }
- return request;
- }
-
- /**
* Return a new search request object.
*
* @param name
--
Gitblit v1.10.0