File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
core-api/src/main/java/com/optimizely/ab/config Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2323import javax .annotation .Nonnull ;
2424import javax .annotation .Nullable ;
2525
26+ import java .util .Collections ;
2627import java .util .List ;
2728import java .util .Map ;
2829
@@ -49,8 +50,13 @@ public Variation(@JsonProperty("id") String id,
4950 @ JsonProperty ("variables" ) List <LiveVariableUsageInstance > liveVariableUsageInstances ) {
5051 this .id = id ;
5152 this .key = key ;
52- this .liveVariableUsageInstances = liveVariableUsageInstances ;
53- this .variableIdToLiveVariableUsageInstanceMap = ProjectConfigUtils .generateIdMapping (liveVariableUsageInstances );
53+ if (liveVariableUsageInstances == null ) {
54+ this .liveVariableUsageInstances = Collections .emptyList ();
55+ }
56+ else {
57+ this .liveVariableUsageInstances = liveVariableUsageInstances ;
58+ }
59+ this .variableIdToLiveVariableUsageInstanceMap = ProjectConfigUtils .generateIdMapping (this .liveVariableUsageInstances );
5460 }
5561
5662 public @ Nonnull String getId () {
You can’t perform that action at this time.
0 commit comments