Skip to content

Commit 8d54a9c

Browse files
committed
Remove old withUserId method
1 parent cba4bff commit 8d54a9c

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/model/CrashlyticsReport.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,6 @@ public CrashlyticsReport withNdkPayload(@NonNull FilesPayload filesPayload) {
153153
return toBuilder().setSession(null).setNdkPayload(filesPayload).build();
154154
}
155155

156-
/**
157-
* Augment an existing {@link CrashlyticsReport} with a given user ID.
158-
*
159-
* @return a new {@link CrashlyticsReport} with its Session.User object containing the given user
160-
* ID.
161-
*/
162-
@NonNull
163-
public CrashlyticsReport withUserId(@NonNull String userId) {
164-
return toBuilder().setSession(getSession().withUserId(userId)).build();
165-
}
166-
167156
/**
168157
* Augment an existing {@link CrashlyticsReport} with fields set at session end.
169158
*
@@ -322,11 +311,6 @@ Session withOrganizationId(@NonNull String organizationId) {
322311
return toBuilder().setApp(app).build();
323312
}
324313

325-
@NonNull
326-
Session withUserId(@NonNull String userId) {
327-
return toBuilder().setUser(User.builder().setIdentifier(userId).build()).build();
328-
}
329-
330314
@NonNull
331315
Session withSessionEndFields(long timestamp, boolean isCrashed, @Nullable String userId) {
332316
final Builder builder = toBuilder();

firebase-crashlytics/src/test/java/com/google/firebase/crashlytics/internal/model/CrashlyticsReportTest.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,6 @@ public void testWithOrganizationId_returnsNewReportWithOrganizationId() {
5959
withOrganizationIdReport.getSession().getApp().getOrganization().getClsId());
6060
}
6161

62-
@Test
63-
public void testWithUserId_returnsNewReportWithUserId() {
64-
final CrashlyticsReport testReport = makeTestReport();
65-
66-
assertNull(testReport.getSession().getUser());
67-
68-
final CrashlyticsReport withUserIdReport = testReport.withUserId("userId");
69-
70-
assertNotEquals(testReport, withUserIdReport);
71-
assertNotNull(withUserIdReport.getSession().getUser());
72-
assertEquals("userId", withUserIdReport.getSession().getUser().getIdentifier());
73-
}
74-
7562
@Test
7663
public void testWithSessionEndFields_returnsNewReportWithSessionEndFields() {
7764
final CrashlyticsReport testReport = makeTestReport();

0 commit comments

Comments
 (0)