-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SDKKey validation update to handle proxy and new format * Comparators rework Added Comparator enum Removed:IS ONE OF, IS NOT ONE OF Changed: CONTAINS, DOES_NOT_CONTAIN Added: DATE_BEFORE, DATE_AFTER, HASHED_EQUALS, HASHED_NOT_EQUALS, HASHED_STARTS_WITH, HASHED_ENDS_WITH, HASHED_ARRAY_CONTAINS, HASHED_ARRAY_NOT_CONTAINS * Fix logMatch for date comparator * Fix comparators names * Updated const to config_v6 * Small fixes in comparators name * v6 model added, evaluation and tests updated * Implement evaluatePrerequisiteFlagCondition and added v6 tests * Fix comparator and other errors * Added segments impl and test * Rename ComparisonCondition to UserCondition * Add logs * Evaluation logs and test added * Small fixes * Remove TODOs * Code Format * EvaluationLogger run based on loglevel * V5 and v6 sdk keys updated * EvaluationLoggerTurnOffTest update with LogLevel checks * User attributeValueFrom helper methods added with test. * Add some javadoc * Fix test error after merge * Fix list truncation * Bug and code smell fixes * Add text comparators and update test. Update config model. * Segment tests and evaluation update. * Unicode test and fix * Remove unnecessary byte array copy * Code format * Code smell fixes * Add ConditionAccessor interface to make evaluateConditions method more readable. * Update circular dependency check to throw error. Add target rule and percentage test. Update User to handle Object custom values. * Reformat Code * Update proguard * Small fix and add missing test * Rename Comparator to UserComparator Fix User toString and attribute override Fix NaN skip and added missing test (byte, short) to UserAttributeConverterTest * evaluateConditions default result set to true. Add validateReturnType. Fix getKeyAndValueFromSettingMap method to handel targetingRule's percentageOptions as well * Update 1103 error message * Update evaluateHashedStartOrEndsWith * Fix circularDependency missing remove * Trim and UserCondition evaluator method updated based on reviews. * Added specialCharacters test. Added returnType tests. Added trim tests. * Set ConditionAccessor.java to package-private. Rename ServedValue to SimpleValue. Update JavaDoc. * Reformat Code * Update ci java version to 17. * Update version to 10.0.0 * Fixes based on code review. * Fix prerequisiteFlagOverrideTest test cases. * Fix typo in test name.
- Loading branch information
1 parent
300ec89
commit 12723e8
Showing
135 changed files
with
6,404 additions
and
858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
version=9.1.1 | ||
version=10.0.0 | ||
|
||
org.gradle.jvmargs=-Xmx2g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.configcat; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* Represents a condition. | ||
*/ | ||
public class Condition implements ConditionAccessor { | ||
|
||
@SerializedName(value = "u") | ||
private UserCondition userCondition; | ||
@SerializedName(value = "s") | ||
private SegmentCondition segmentCondition; | ||
@SerializedName(value = "p") | ||
private PrerequisiteFlagCondition prerequisiteFlagCondition; | ||
|
||
@Override | ||
public UserCondition getUserCondition() { | ||
return userCondition; | ||
} | ||
|
||
@Override | ||
public SegmentCondition getSegmentCondition() { | ||
return segmentCondition; | ||
} | ||
|
||
@Override | ||
public PrerequisiteFlagCondition getPrerequisiteFlagCondition() { | ||
return prerequisiteFlagCondition; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.configcat; | ||
|
||
interface ConditionAccessor { | ||
UserCondition getUserCondition(); | ||
|
||
SegmentCondition getSegmentCondition(); | ||
|
||
PrerequisiteFlagCondition getPrerequisiteFlagCondition(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.configcat; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Details of a ConfigCat config. | ||
*/ | ||
public class Config { | ||
|
||
@SerializedName(value = "p") | ||
private Preferences preferences; | ||
@SerializedName(value = "f") | ||
private final Map<String, Setting> entries = new HashMap<>(); | ||
@SerializedName(value = "s") | ||
private Segment[] segments; | ||
|
||
/** | ||
* The config preferences. | ||
*/ | ||
public Preferences getPreferences() { | ||
return preferences; | ||
} | ||
|
||
/** | ||
* The list of segments. | ||
*/ | ||
public Segment[] getSegments() { | ||
return segments; | ||
} | ||
|
||
/** | ||
* The map of settings. | ||
*/ | ||
public Map<String, Setting> getEntries() { | ||
return entries; | ||
} | ||
|
||
boolean isEmpty() { | ||
return EMPTY.equals(this); | ||
} | ||
|
||
public static final Config EMPTY = new Config(); | ||
} |
Oops, something went wrong.