File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ public <TResult> Task<TResult> runTransaction(
461
461
* @param updateFunction The function to execute within the transaction context.
462
462
* @return The task returned from the updateFunction.
463
463
*/
464
+ @ NonNull
464
465
public <TResult > Task <TResult > runTransaction (
465
466
@ NonNull TransactionOptions options , @ NonNull Transaction .Function <TResult > updateFunction ) {
466
467
checkNotNull (updateFunction , "Provided transaction update function must not be null." );
Original file line number Diff line number Diff line change 14
14
15
15
package com .google .firebase .firestore ;
16
16
17
+ import androidx .annotation .NonNull ;
18
+
17
19
/**
18
20
* Parameter for {@link FirebaseFirestore#runTransaction(TransactionOptions, Transaction.Function)}.
19
21
*/
@@ -39,7 +41,7 @@ public Builder() {}
39
41
* Constructs a new {@code TransactionOptions} Builder based on an existing {@code
40
42
* TransactionOptions} object.
41
43
*/
42
- public Builder (TransactionOptions options ) {
44
+ public Builder (@ NonNull TransactionOptions options ) {
43
45
maxAttempts = options .maxAttempts ;
44
46
}
45
47
@@ -48,6 +50,7 @@ public Builder(TransactionOptions options) {
48
50
*
49
51
* @return this builder
50
52
*/
53
+ @ NonNull
51
54
public Builder setMaxAttempts (int maxAttempts ) {
52
55
if (maxAttempts < 1 ) throw new IllegalArgumentException ("Max attempts must be at least 1" );
53
56
this .maxAttempts = maxAttempts ;
@@ -59,6 +62,7 @@ public Builder setMaxAttempts(int maxAttempts) {
59
62
*
60
63
* @return the built {@code TransactionOptions} object
61
64
*/
65
+ @ NonNull
62
66
public TransactionOptions build () {
63
67
return new TransactionOptions (maxAttempts );
64
68
}
You can’t perform that action at this time.
0 commit comments