Skip to content

Commit b33a7e1

Browse files
committed
resolve comments
1 parent a08a955 commit b33a7e1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/testutil/IntegrationTestUtil.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ public enum TargetBackend {
128128

129129
private static boolean backendPrimed = false;
130130

131-
private static final Random RANDOM = new Random();
132-
133-
private static final int MAX_BYTES_PER_FIELD_VALUE = 1048487;
134-
135131
// FirebaseOptions needed to create a test FirebaseApp.
136132
private static final FirebaseOptions OPTIONS =
137133
new FirebaseOptions.Builder()
@@ -574,11 +570,14 @@ public static void checkOnlineAndOfflineResultsMatch(
574570
* be stored in a Firestore document.
575571
*/
576572
public static Map<String, Object> getLargestDocContent() {
573+
int MAX_BYTES_PER_FIELD_VALUE = 1048487;
577574
// Subtract 8 for '__name__', 20 for its value, and 4 for 'blob'.
578575
int numBytesToUse = MAX_BYTES_PER_FIELD_VALUE - 8 - 20 - 4;
576+
579577
byte[] bytes = new byte[numBytesToUse];
580578
// Fill the byte array with random values
581-
RANDOM.nextBytes(bytes);
579+
Random random = new Random();
580+
random.nextBytes(bytes);
582581
return Collections.singletonMap("blob", Blob.fromBytes(bytes));
583582
}
584583
}

0 commit comments

Comments
 (0)