Skip to content

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

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

mnoman09
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Sep 25, 2018

Pull Request Test Coverage Report for Build 653

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.997%

Totals Coverage Status
Change from base Build 641: 0.0%
Covered Lines: 2386
Relevant Lines: 2681

💛 - 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())) {
Copy link
Contributor

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()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space before and after ==

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mikeproeng37 mikeproeng37 merged commit 772e7ab into master Oct 2, 2018
mikeproeng37 pushed a commit that referenced this pull request Oct 2, 2018
@mnoman09 mnoman09 deleted the mnoman/nullAttributeCheck branch May 6, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants