diff --git a/core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java b/core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java index 140dbd6ef..cc754a609 100644 --- a/core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java +++ b/core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java @@ -81,10 +81,8 @@ public DecisionService(@Nonnull Bucketer bucketer, return null; } - Variation variation; - // check for whitelisting - variation = getWhitelistedVariation(experiment, userId); + Variation variation = getWhitelistedVariation(experiment, userId); if (variation != null) { return variation; } @@ -96,11 +94,10 @@ public DecisionService(@Nonnull Bucketer bucketer, Map userProfileMap = userProfileService.lookup(userId); if (userProfileMap == null) { logger.info("We were unable to get a user profile map from the UserProfileService."); - } - else if (UserProfileUtils.isValidUserProfileMap(userProfileMap)) { + } else if (UserProfileUtils.isValidUserProfileMap(userProfileMap)) { userProfile = UserProfileUtils.convertMapToUserProfile(userProfileMap); } else { - logger.warn("The User Profile Service returned an invalid map."); + logger.warn("The UserProfileService returned an invalid map."); } } catch (Exception exception) { logger.error(exception.getMessage()); diff --git a/core-api/src/main/java/com/optimizely/ab/bucketing/UserProfileUtils.java b/core-api/src/main/java/com/optimizely/ab/bucketing/UserProfileUtils.java index 9829e2147..24d21f3eb 100644 --- a/core-api/src/main/java/com/optimizely/ab/bucketing/UserProfileUtils.java +++ b/core-api/src/main/java/com/optimizely/ab/bucketing/UserProfileUtils.java @@ -68,8 +68,8 @@ static boolean isValidUserProfileMap(@Nonnull Map map) { /** * Convert a Map to a {@link UserProfile} instance. - * @param map The map to construct the User Profile from. - * @return A User Profile instance. + * @param map The map to construct the {@link UserProfile} from. + * @return A {@link UserProfile} instance. */ static UserProfile convertMapToUserProfile(@Nonnull Map map) { String userId = (String) map.get(UserProfileService.userIdKey);