Skip to content

Commit 4ddfa86

Browse files
author
Varun Rathore
committed
fix build
1 parent 0aed763 commit 4ddfa86

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/main/java/com/google/firebase/remoteconfig/ParameterValue.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public static PersonalizationValue ofPersonalization(String personalizationId) {
8080
*
8181
* @param experimentId The experiment ID.
8282
* @param variantValues The list of experiment variant values.
83+
* @param exposurePercent The exposure percentage of the experiment.
8384
* @return A {@link ParameterValue.ExperimentValue} instance.
8485
*/
8586
public static ExperimentValue ofExperiment(
@@ -456,7 +457,7 @@ public boolean equals(Object o) {
456457
ExperimentValue that = (ExperimentValue) o;
457458
return Objects.equals(experimentId, that.experimentId)
458459
&& Objects.equals(variantValues, that.variantValues)
459-
&& Double.compare(that.exposurePercent, exposurePercent) == 0;
460+
&& Objects.equals(that.exposurePercent, exposurePercent);
460461
}
461462

462463
@Override

src/test/java/com/google/firebase/remoteconfig/ParameterValueTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ public void testEquality() {
134134
ParameterValue.ofExperiment("experiment_1", ImmutableList.of(
135135
ExperimentVariantValue.of("variant_2", "value_2")
136136
), 10.0);
137-
137+
ParameterValue.ExperimentValue experimentValueFive =
138+
ParameterValue.ofExperiment("exp_1", ImmutableList.of(
139+
ExperimentVariantValue.of("variant_2", "value_2")
140+
), 20.0);
141+
assertNotEquals(experimentValueOne, experimentValueFive);
138142
assertEquals(experimentValueOne, experimentValueTwo);
139143
assertNotEquals(experimentValueOne, experimentValueThree);
140144
assertNotEquals(experimentValueOne, experimentValueFour);

0 commit comments

Comments
 (0)