@@ -68,7 +68,7 @@ public Tenant getTenant(@NonNull String tenantId) throws FirebaseAuthException {
68
68
}
69
69
70
70
public synchronized TenantAwareFirebaseAuth getAuthForTenant (@ NonNull String tenantId ) {
71
- checkArgument (!Strings .isNullOrEmpty (tenantId ), "tenantId must not be null or empty" );
71
+ checkArgument (!Strings .isNullOrEmpty (tenantId ), "Tenant ID must not be null or empty. " );
72
72
if (!tenantAwareAuths .containsKey (tenantId )) {
73
73
tenantAwareAuths .put (tenantId , new TenantAwareFirebaseAuth (firebaseApp , tenantId ));
74
74
}
@@ -90,7 +90,7 @@ public ApiFuture<Tenant> getTenantAsync(@NonNull String tenantId) {
90
90
91
91
private CallableOperation <Tenant , FirebaseAuthException > getTenantOp (final String tenantId ) {
92
92
checkNotDestroyed ();
93
- checkArgument (!Strings .isNullOrEmpty (tenantId ), "tenantId must not be null or empty" );
93
+ checkArgument (!Strings .isNullOrEmpty (tenantId ), "Tenant ID must not be null or empty. " );
94
94
return new CallableOperation <Tenant , FirebaseAuthException >() {
95
95
@ Override
96
96
protected Tenant execute () throws FirebaseAuthException {
@@ -196,7 +196,7 @@ public ApiFuture<Tenant> createTenantAsync(@NonNull CreateRequest request) {
196
196
private CallableOperation <Tenant , FirebaseAuthException > createTenantOp (
197
197
final CreateRequest request ) {
198
198
checkNotDestroyed ();
199
- checkNotNull (request , "create request must not be null" );
199
+ checkNotNull (request , "Create request must not be null. " );
200
200
return new CallableOperation <Tenant , FirebaseAuthException >() {
201
201
@ Override
202
202
protected Tenant execute () throws FirebaseAuthException {
@@ -234,7 +234,9 @@ public ApiFuture<Tenant> updateTenantAsync(@NonNull UpdateRequest request) {
234
234
private CallableOperation <Tenant , FirebaseAuthException > updateTenantOp (
235
235
final UpdateRequest request ) {
236
236
checkNotDestroyed ();
237
- checkNotNull (request , "update request must not be null" );
237
+ checkNotNull (request , "Update request must not be null." );
238
+ checkArgument (!request .getProperties ().isEmpty (),
239
+ "Tenant update must have at least one property set." );
238
240
return new CallableOperation <Tenant , FirebaseAuthException >() {
239
241
@ Override
240
242
protected Tenant execute () throws FirebaseAuthException {
@@ -269,7 +271,7 @@ public ApiFuture<Void> deleteTenantAsync(String tenantId) {
269
271
270
272
private CallableOperation <Void , FirebaseAuthException > deleteTenantOp (final String tenantId ) {
271
273
checkNotDestroyed ();
272
- checkArgument (!Strings .isNullOrEmpty (tenantId ), "tenantId must not be null or empty" );
274
+ checkArgument (!Strings .isNullOrEmpty (tenantId ), "Tenant ID must not be null or empty. " );
273
275
return new CallableOperation <Void , FirebaseAuthException >() {
274
276
@ Override
275
277
protected Void execute () throws FirebaseAuthException {
0 commit comments