Browse code

[mapi] BM-14971 Fix: update contact of description in a public folder was failing because write streams only handled binary props

Thomas Cataldo authored on 21/06/2019 15:10:38
Showing 1 changed files
... ...
@@ -203,20 +203,16 @@ public class CoreStorageBackend implements StorageApiLink {
203 203
 	}
204 204
 
205 205
 	public CompletableFuture<Boolean> validate(String login, String secret) {
206
-		CompletableFuture<Boolean> ret = new CompletableFuture<>();
207 206
 		IAuthenticationPromise authApi = asyncProv.instance(IAuthenticationPromise.class);
208
-		authApi.validate(login, secret, "replication-auth").thenAccept(validation -> {
207
+		return authApi.validate(login, secret, "replication-auth").thenApply(validation -> {
209 208
 			switch (validation) {
210 209
 			case TOKEN:
211 210
 			case PASSWORD:
212
-				ret.complete(true);
213
-				break;
211
+				return true;
214 212
 			default:
215
-				ret.complete(false);
216
-				break;
213
+				return false;
217 214
 			}
218 215
 		});
219
-		return ret;
220 216
 	}
221 217
 
222 218
 	public CompletableFuture<Void> delete(MailboxReplicaRootDescriptor root, String partition) {