opendj-core/src/main/java/com/forgerock/reactive/Completable.java
@@ -24,9 +24,8 @@ * decouple ourself from reactive framework (RxJava/Reactor). */ public interface Completable extends Publisher<Void> { /** Subscriber is notified when the operation has been completed, successfully or not. */ public interface Subscriber { interface Subscriber { /** Called once this {@link Completable} is completed. */ void onComplete(); @@ -40,7 +39,7 @@ } /** Adapts the streaming api to a callback one. */ public interface Emitter { interface Emitter { /** * Called when the streaming api has been subscribed. * opendj-core/src/main/java/com/forgerock/reactive/RxJavaStreams.java
@@ -17,7 +17,6 @@ import org.forgerock.util.Function; import org.reactivestreams.Publisher; import org.reactivestreams.Subscription; import io.reactivex.CompletableEmitter; import io.reactivex.CompletableOnSubscribe; @@ -88,7 +87,7 @@ /** * Create a new {@link Single} from the given {@link Publisher}. If the {@link Publisher} produce more than one * result, they'll be dropped and the inner {@link Subscription} cancelled. * result, they'll be dropped and the inner {@link org.reactivestreams.Subscription Subscription} cancelled. * * @param <V> * Type of the datum emitted opendj-core/src/main/java/com/forgerock/reactive/Single.java
@@ -29,7 +29,7 @@ public interface Single<V> extends Publisher<V> { /** Subscriber is notified when the operation has been completed, successfully or not. */ public interface Subscriber<V> { interface Subscriber<V> { /** * Called once this {@link Single} is completed. * @@ -48,12 +48,13 @@ } /** Adapts the streaming api to a callback one. */ public interface Emitter<V> { interface Emitter<V> { /** * Called for each SingleObserver that subscribes. * * @param s * The {@link Subscriber} to use to communicate the completeness of this {@link Single} * The {@link com.forgerock.reactive.Single.Subscriber Subscriber} to use to communicate * the completeness of this {@link Single} * @throws Exception * on error */ opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPPasswordModify.java
@@ -38,13 +38,13 @@ import org.forgerock.opendj.ldap.requests.PasswordModifyExtendedRequest; import org.forgerock.opendj.ldap.requests.Requests; import org.forgerock.opendj.ldap.responses.PasswordModifyExtendedResult; import org.forgerock.util.annotations.VisibleForTesting; import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ConnectionFactoryProvider; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.StringArgument; import org.forgerock.util.annotations.VisibleForTesting; /** * A tool that can be used to issue LDAP password modify extended requests to @@ -196,13 +196,7 @@ throw newToolParamException(e, e.getMessageObject()); } Connection connection; try { connection = argParser.getConnectionFactory().getConnection(); } catch (final LdapException ere) { return printErrorMessage(this, ere, ERR_LDAPPWMOD_FAILED); } try (Connection connection = argParser.getConnectionFactory().getConnection()) { if (proxyAuthzID.isPresent()) { request.setUserIdentity(proxyAuthzID.getValue()); } @@ -219,13 +213,7 @@ request.setNewPassword(newPWFile.getValue().toCharArray()); } PasswordModifyExtendedResult result; try { result = connection.extendedRequest(request); } catch (final LdapException e) { return printErrorMessage(this, e, ERR_LDAPPWMOD_FAILED); } PasswordModifyExtendedResult result = connection.extendedRequest(request); println(INFO_LDAPPWMOD_SUCCESSFUL.get()); Utils.printlnTextMsg(this, INFO_LDAPPWMOD_ADDITIONAL_INFO, result.getDiagnosticMessage()); if (result.getGeneratedPassword() != null) { @@ -234,5 +222,8 @@ } return ResultCode.SUCCESS.intValue(); } catch (final LdapException e) { return printErrorMessage(this, e, ERR_LDAPPWMOD_FAILED); } } }