|
1 | 1 | package dev.openfeature.sdk;
|
2 | 2 |
|
3 |
| -import lombok.EqualsAndHashCode; |
4 |
| -import lombok.ToString; |
5 |
| -import lombok.experimental.Delegate; |
6 |
| - |
7 | 3 | import java.time.Instant;
|
8 | 4 | import java.util.HashMap;
|
9 | 5 | import java.util.List;
|
10 | 6 | import java.util.Map;
|
| 7 | +import java.util.function.Function; |
| 8 | +import dev.openfeature.sdk.internal.ExcludeFromGeneratedCoverageReport; |
| 9 | +import lombok.EqualsAndHashCode; |
| 10 | +import lombok.ToString; |
| 11 | +import lombok.experimental.Delegate; |
11 | 12 |
|
12 | 13 | /**
|
13 | 14 | * The EvaluationContext is a container for arbitrary contextual data
|
|
20 | 21 | @SuppressWarnings("PMD.BeanMembersShouldSerialize")
|
21 | 22 | public class MutableContext implements EvaluationContext {
|
22 | 23 |
|
23 |
| - @Delegate(excludes = HideDelegateAddMethods.class) private final MutableStructure structure; |
| 24 | + @Delegate(excludes = DelegateExclusions.class) |
| 25 | + private final MutableStructure structure; |
24 | 26 |
|
25 | 27 | public MutableContext() {
|
26 | 28 | this(new HashMap<>());
|
@@ -124,11 +126,21 @@ public EvaluationContext merge(EvaluationContext overridingContext) {
|
124 | 126 | /**
|
125 | 127 | * Hidden class to tell Lombok not to copy these methods over via delegation.
|
126 | 128 | */
|
127 |
| - private static class HideDelegateAddMethods { |
| 129 | + @SuppressWarnings("all") |
| 130 | + private static class DelegateExclusions { |
| 131 | + |
| 132 | + @ExcludeFromGeneratedCoverageReport |
| 133 | + public <T extends Structure> Map<String, Value> merge(Function<Map<String, Value>, Structure> newStructure, |
| 134 | + Map<String, Value> base, |
| 135 | + Map<String, Value> overriding) { |
| 136 | + |
| 137 | + return null; |
| 138 | + } |
| 139 | + |
128 | 140 | public MutableStructure add(String ignoredKey, Boolean ignoredValue) {
|
129 | 141 | return null;
|
130 | 142 | }
|
131 |
| - |
| 143 | + |
132 | 144 | public MutableStructure add(String ignoredKey, Double ignoredValue) {
|
133 | 145 | return null;
|
134 | 146 | }
|
|
0 commit comments