-
Notifications
You must be signed in to change notification settings - Fork 32
Fix: null attribute check in decisionService and experimentUtils #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 653
💛 - Coveralls |
@@ -348,7 +348,7 @@ void saveVariation(@Nonnull Experiment experiment, | |||
String getBucketingId(@Nonnull String userId, | |||
@Nonnull Map<String, ?> filteredAttributes) { | |||
String bucketingId = userId; | |||
if (filteredAttributes.containsKey(ControlAttribute.BUCKETING_ATTRIBUTE.toString())) { | |||
if (filteredAttributes!=null && filteredAttributes.containsKey(ControlAttribute.BUCKETING_ATTRIBUTE.toString())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Space before and after the !=
@@ -67,7 +67,7 @@ public static boolean isUserInExperiment(@Nonnull ProjectConfig projectConfig, | |||
} | |||
|
|||
// if there are audiences, but no user attributes, the user is not in the experiment. | |||
if (attributes.isEmpty()) { | |||
if (attributes==null || attributes.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space before and after ==
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.