Skip to content

Commit 8686312

Browse files
fix linting
Signed-off-by: Thomas Poignant <[email protected]>
1 parent 08c2306 commit 8686312

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/GoFeatureFlagProviderOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import com.github.benmanes.caffeine.cache.Caffeine;
44
import dev.openfeature.sdk.ProviderEvaluation;
5+
import java.util.Map;
56
import lombok.Builder;
67
import lombok.Getter;
7-
import java.util.Map;
88

99
/** GoFeatureFlagProviderOptions contains the options to initialise the provider. */
1010
@Builder
@@ -95,7 +95,6 @@ public class GoFeatureFlagProviderOptions {
9595
/**
9696
* (optional) exporterMetadata is the metadata we send to the GO Feature Flag relay proxy when we report the
9797
* evaluation data usage.
98-
*
9998
* ‼️Important: If you are using a GO Feature Flag relay proxy before version v1.41.0, the information of this
10099
* field will not be added to your feature events.
101100
*/

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/controller/GoFeatureFlagController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import dev.openfeature.sdk.exceptions.TypeMismatchError;
3232
import java.io.IOException;
3333
import java.net.HttpURLConnection;
34-
import java.util.Arrays;
3534
import java.util.HashMap;
3635
import java.util.List;
3736
import java.util.Map;

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/hook/events/Events.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,22 @@
99
/** Events data. */
1010
@Getter
1111
public class Events {
12+
/**
13+
* meta contains the metadata of the events to be sent along the events.
14+
*/
1215
private final Map<String, Object> meta = new HashMap<>();
16+
17+
/**
18+
* list of events to be sent to the data collector to collect the evaluation data.
19+
*/
1320
private final List<Event> events;
1421

22+
/**
23+
* Constructor.
24+
*
25+
* @param events - list of events to be sent to the data collector to collect the evaluation data.
26+
* @param exporterMetadata - metadata of the events to be sent along the events.
27+
*/
1528
public Events(List<Event> events, Map<String, Object> exporterMetadata) {
1629
this.events = new ArrayList<>(events);
1730
this.meta.put("provider", "java");

providers/go-feature-flag/src/test/java/dev/openfeature/contrib/providers/gofeatureflag/GoFeatureFlagProviderTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,11 @@ void should_send_exporter_metadata() {
979979
want.put("version", "1.0.0");
980980
want.put("intTest", 1234567890);
981981
want.put("doubleTest", 12345.6789);
982-
want.put("openfeature",true);
982+
want.put("openfeature", true);
983983
want.put("provider", "java");
984-
assertEquals(want, this.exporterMetadata,
984+
assertEquals(
985+
want,
986+
this.exporterMetadata,
985987
"we should have the exporter metadata in the last event sent to the data collector");
986988
}
987989

0 commit comments

Comments
 (0)