Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions core-api/src/main/java/com/optimizely/ab/Optimizely.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ private void sendImpression(@Nonnull ProjectConfig projectConfig,
* @param ruleType It can either be experiment in case impression event is sent from activate or it's feature-test or rollout
*/
private void sendImpression(@Nonnull ProjectConfig projectConfig,
@Nonnull Experiment experiment,
@Nullable Experiment experiment,
@Nonnull String userId,
@Nonnull Map<String, ?> filteredAttributes,
@Nonnull Variation variation,
@Nullable Variation variation,
@Nonnull String flagKey,
@Nonnull String ruleType,
@Nonnull boolean enabled) {
Expand Down Expand Up @@ -425,15 +425,6 @@ private Boolean isFeatureEnabled(@Nonnull ProjectConfig projectConfig,
if (featureDecision.decisionSource != null) {
decisionSource = featureDecision.decisionSource;
}
sendImpression(
projectConfig,
featureDecision.experiment,
userId,
copiedAttributes,
featureDecision.variation,
featureKey,
decisionSource.toString(),
featureEnabled);

if (featureDecision.variation != null) {
// This information is only necessary for feature tests.
Expand All @@ -448,6 +439,15 @@ private Boolean isFeatureEnabled(@Nonnull ProjectConfig projectConfig,
featureEnabled = true;
}
}
sendImpression(
projectConfig,
featureDecision.experiment,
userId,
copiedAttributes,
featureDecision.variation,
featureKey,
decisionSource.toString(),
featureEnabled);

DecisionNotification decisionNotification = DecisionNotification.newFeatureDecisionNotificationBuilder()
.withUserId(userId)
Expand Down