-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix evaluating force property in rule when rule is JsonObject and def…
…ined as null (#112) * fix evaluating force property in rule when rule is JsonObject and defined as null * replace hasForceProperty logic with wrapper to distinguish if force field is present in response or not --------- Co-authored-by: Bohdan Akimenko <[email protected]>
- Loading branch information
1 parent
2aa2f88
commit 9e9ce7c
Showing
5 changed files
with
113 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package growthbook.sdk.java; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
public class OptionalField<ValueType> { | ||
private final boolean isPresent; | ||
@Nullable | ||
private final ValueType value; | ||
|
||
public OptionalField(boolean isPresent, @Nullable ValueType value) { | ||
this.isPresent = isPresent; | ||
this.value = value; | ||
} | ||
|
||
public boolean isPresent() { | ||
return isPresent; | ||
} | ||
|
||
@Nullable | ||
public ValueType getValue() { | ||
return value; | ||
} | ||
} |
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