Skip to content

Commit c50684d

Browse files
jaeoptclaude
andcommitted
[FSSDK-12670] Restore deprecated identifyUser overloads for backward compatibility
Keep old identifyUser(String) and identifyUser(String, String) signatures as @deprecated wrappers that delegate to the new identifyUser(Map) method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 97dcc38 commit c50684d

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

core-api/src/main/java/com/optimizely/ab/odp/ODPEventManager.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,34 @@ public void updateSettings(ODPConfig newConfig) {
111111
}
112112
}
113113

114+
/**
115+
* @deprecated Use {@link #identifyUser(Map)} instead.
116+
*/
117+
@Deprecated
118+
public void identifyUser(String userId) {
119+
identifyUser(null, userId);
120+
}
121+
122+
/**
123+
* @deprecated Use {@link #identifyUser(Map)} instead.
124+
*/
125+
@Deprecated
126+
public void identifyUser(@Nullable String vuid, @Nullable String userId) {
127+
Map<String, String> identifiers = new HashMap<>();
128+
if (vuid != null) {
129+
identifiers.put(ODPUserKey.VUID.getKeyString(), vuid);
130+
}
131+
if (userId != null) {
132+
if (ODPManager.isVuid(userId)) {
133+
identifiers.put(ODPUserKey.VUID.getKeyString(), userId);
134+
} else {
135+
identifiers.put(ODPUserKey.FS_USER_ID.getKeyString(), userId);
136+
}
137+
}
138+
identifyUser(identifiers);
139+
}
140+
114141
public void identifyUser(@Nonnull Map<String, String> identifiers) {
115-
// Filter out identifiers with null or empty values
116142
Map<String, String> validIdentifiers = new HashMap<>();
117143
for (Map.Entry<String, String> entry : identifiers.entrySet()) {
118144
if (entry.getValue() != null && !entry.getValue().isEmpty()) {

0 commit comments

Comments
 (0)