Skip to content

Commit 75fe6aa

Browse files
committed
JVMCBC-1679 (followup) Rename setAuthenticator -> authenticator
Motivation ---------- Consistency with existing mutators. Change-Id: Ib96728e302e6df420aa7998039951d733eaf2ad3 Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/235869 Reviewed-by: Michael Reiche <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 32c72d1 commit 75fe6aa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

core-io/src/main/java/com/couchbase/client/core/env/PasswordAuthenticator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static PasswordAuthenticator.Builder builder(String username, String pass
8989
* in the volatile field.
9090
*
9191
* @deprecated This method is difficult to use safely, because it's easy to accidentally
92-
* do blocking IO inside the supplier. Please use {@code cluster.setAuthenticator(newAuthenticator)} instead.
92+
* do blocking IO inside the supplier. Please use {@code cluster.authenticator(newAuthenticator)} instead.
9393
*/
9494
@Deprecated
9595
public static PasswordAuthenticator.Builder builder(Supplier<UsernameAndPassword> supplier) {
@@ -236,7 +236,7 @@ public Builder username(final String username) {
236236
* @param username A supplier that returns the username to use.
237237
* @return this builder for chaining purposes.
238238
* @deprecated This method does not support returning username and password as an atomic unit.
239-
* Please use {@code cluster.setAuthenticator(newAuthenticator)} instead.
239+
* Please use {@code cluster.authenticator(newAuthenticator)} instead.
240240
*/
241241
@Deprecated
242242
public Builder username(final Supplier<String> username) {
@@ -278,7 +278,7 @@ public Builder password(final String password) {
278278
* @param password the password to alongside for the username provided.
279279
* @return this builder for chaining purposes.
280280
* @deprecated This method does not support returning username and password as an atomic unit.
281-
* Please use {@code cluster.setAuthenticator(newAuthenticator)} instead.
281+
* Please use {@code cluster.authenticator(newAuthenticator)} instead.
282282
*/
283283
@Deprecated
284284
public Builder password(final Supplier<String> password) {

java-client/src/main/java/com/couchbase/client/java/AsyncCluster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ String clusterToStringHelper(Class clusterClass) {
269269
));
270270
}
271271

272-
public void setAuthenticator(Authenticator newAuthenticator) {
272+
public void authenticator(Authenticator newAuthenticator) {
273273
authenticator.setDelegate(newAuthenticator);
274274
}
275275

java-client/src/main/java/com/couchbase/client/java/Cluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ public ReactiveCluster reactive() {
317317
return reactiveCluster;
318318
}
319319

320-
public void setAuthenticator(Authenticator newAuthenticator) {
321-
asyncCluster.setAuthenticator(newAuthenticator);
320+
public void authenticator(Authenticator newAuthenticator) {
321+
asyncCluster.authenticator(newAuthenticator);
322322
}
323323

324324
/**

java-client/src/main/java/com/couchbase/client/java/ReactiveCluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ private ReactiveCluster(
188188
this.reactor = asyncCluster.environment();
189189
}
190190

191-
public void setAuthenticator(Authenticator newAuthenticator) {
192-
asyncCluster.setAuthenticator(newAuthenticator);
191+
public void authenticator(Authenticator newAuthenticator) {
192+
asyncCluster.authenticator(newAuthenticator);
193193
}
194194

195195
/**

0 commit comments

Comments
 (0)