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

AdhavanM
04.00.2019 a229c2ad7d088b3e7d87259521d967f861b1d056
Adds a newSearchResultEntry that takes a SearchResultEntry

A new method newSearchResultEntry that takes a SearchResultEntry is added,so that we don't lose the control type in the Response.
1 files modified
19 ■■■■■ changed files
opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java 19 ●●●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/Responses.java
@@ -309,6 +309,25 @@
        return new SearchResultEntryImpl(entry);
    }
     /**
     * Creates a new search result entry backed by the provided entry.
     * Modifications made to {@code entry} will be reflected in the returned
     * search result entry. The returned search result entry supports updates to
     * its list of controls, as well as updates to the name and attributes if
     * the underlying entry allows.
     *
     * @param entry
     *            The SearchResultEntry.
     * @return The new search result entry.
     * @throws NullPointerException
     *             If {@code entry} was {@code null} .
     */
    public static SearchResultEntry newSearchResultEntry(final SearchResultEntry entry) {
        Reject.ifNull(entry);
        return new SearchResultEntryImpl(entry);
    }
    /**
     * Creates a new search result entry using the provided distinguished name
     * decoded using the default schema.