Skip to content

Commit 8a9738f

Browse files
exclude lombok generated functions from codecov
Signed-off-by: Alexandra Oberaigner <alexandra.oberaigner@dynatrace.com>
1 parent 1d8f758 commit 8a9738f

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

src/main/java/dev/openfeature/sdk/DefaultHookData.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.HashMap;
44
import java.util.Map;
55
import java.util.Objects;
6+
import lombok.Generated;
67

78
/**
89
* Default implementation of HookData.
@@ -38,6 +39,7 @@ public <T> T get(String key, Class<T> type) {
3839
return type.cast(value);
3940
}
4041

42+
@Generated
4143
@Override
4244
public boolean equals(Object o) {
4345
if (o == null || getClass() != o.getClass()) {
@@ -47,6 +49,7 @@ public boolean equals(Object o) {
4749
return Objects.equals(data, that.data);
4850
}
4951

52+
@Generated
5053
@Override
5154
public int hashCode() {
5255
return Objects.hashCode(data);

src/main/java/dev/openfeature/sdk/HookContext.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
44
import java.util.Objects;
5+
import lombok.Generated;
56
import lombok.NonNull;
67

78
/**
@@ -92,6 +93,7 @@ public static <T> HookContextBuilder<T> builder() {
9293
return sharedContext.getFlagKey();
9394
}
9495

96+
@Generated
9597
public @NonNull FlagValueType getType() {
9698
return sharedContext.getType();
9799
}
@@ -117,6 +119,7 @@ public HookData getHookData() {
117119
return this.hookData;
118120
}
119121

122+
@Generated
120123
@Override
121124
public boolean equals(Object o) {
122125
if (o == null || getClass() != o.getClass()) {
@@ -128,11 +131,13 @@ public boolean equals(Object o) {
128131
&& Objects.equals(sharedContext, that.sharedContext);
129132
}
130133

134+
@Generated
131135
@Override
132136
public int hashCode() {
133137
return Objects.hash(ctx, hookData, sharedContext);
134138
}
135139

140+
@Generated
136141
@Override
137142
public String toString() {
138143
return "HookContext(flagKey=" + this.getFlagKey() + ", type=" + this.getType() + ", defaultValue="
@@ -151,6 +156,7 @@ void setCtx(@NonNull EvaluationContext ctx) {
151156
* @return new HookContext with updated flagKey or the same instance if unchanged
152157
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
153158
*/
159+
@Generated
154160
@Deprecated
155161
public HookContext<T> withFlagKey(@NonNull String flagKey) {
156162
return Objects.equals(this.getFlagKey(), flagKey)
@@ -172,6 +178,7 @@ public HookContext<T> withFlagKey(@NonNull String flagKey) {
172178
* @return new HookContext with updated type or the same instance if unchanged
173179
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
174180
*/
181+
@Generated
175182
@Deprecated
176183
public HookContext<T> withType(@NonNull FlagValueType type) {
177184
return this.getType() == type
@@ -193,6 +200,7 @@ public HookContext<T> withType(@NonNull FlagValueType type) {
193200
* @return new HookContext with updated defaultValue or the same instance if unchanged
194201
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
195202
*/
203+
@Generated
196204
@Deprecated
197205
public HookContext<T> withDefaultValue(@NonNull T defaultValue) {
198206
return this.getDefaultValue() == defaultValue
@@ -214,6 +222,7 @@ public HookContext<T> withDefaultValue(@NonNull T defaultValue) {
214222
* @return new HookContext with updated ctx or the same instance if unchanged
215223
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
216224
*/
225+
@Generated
217226
@Deprecated
218227
public HookContext<T> withCtx(@NonNull EvaluationContext ctx) {
219228
return this.ctx == ctx
@@ -235,6 +244,7 @@ public HookContext<T> withCtx(@NonNull EvaluationContext ctx) {
235244
* @return new HookContext with updated clientMetadata or the same instance if unchanged
236245
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
237246
*/
247+
@Generated
238248
@Deprecated
239249
public HookContext<T> withClientMetadata(ClientMetadata clientMetadata) {
240250
return this.getClientMetadata() == clientMetadata
@@ -256,6 +266,7 @@ public HookContext<T> withClientMetadata(ClientMetadata clientMetadata) {
256266
* @return new HookContext with updated providerMetadata or the same instance if unchanged
257267
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
258268
*/
269+
@Generated
259270
@Deprecated
260271
public HookContext<T> withProviderMetadata(Metadata providerMetadata) {
261272
return this.getProviderMetadata() == providerMetadata
@@ -277,6 +288,7 @@ public HookContext<T> withProviderMetadata(Metadata providerMetadata) {
277288
* @return new HookContext with updated hookData or the same instance if unchanged
278289
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
279290
*/
291+
@Generated
280292
@Deprecated
281293
public HookContext<T> withHookData(HookData hookData) {
282294
return this.hookData == hookData
@@ -297,6 +309,7 @@ public HookContext<T> withHookData(HookData hookData) {
297309
* @param <T> The flag type.
298310
* @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances.
299311
*/
312+
@Generated
300313
@Deprecated
301314
public static class HookContextBuilder<T> {
302315
private String flagKey;
@@ -361,6 +374,7 @@ public HookContext<T> build() {
361374
this.hookData);
362375
}
363376

377+
@Generated
364378
@Override
365379
public String toString() {
366380
return "HookContext.HookContextBuilder(flagKey=" + this.flagKey + ", type=" + this.type + ", defaultValue="

src/main/java/dev/openfeature/sdk/Pair.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package dev.openfeature.sdk;
22

3+
import lombok.Generated;
4+
35
class Pair<K, V> {
46
private final K key;
57
private final V value;
@@ -17,6 +19,7 @@ public V getValue() {
1719
return value;
1820
}
1921

22+
@Generated
2023
@Override
2124
public String toString() {
2225
return "Pair{" + "key=" + key + ", value=" + value + '}';

src/main/java/dev/openfeature/sdk/SharedHookContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.openfeature.sdk;
22

33
import java.util.Objects;
4+
import lombok.Generated;
45
import lombok.Getter;
56

67
@Getter
@@ -29,6 +30,7 @@ public HookContext<T> hookContextFor(EvaluationContext evaluationContext, HookDa
2930
return new HookContext<>(this, evaluationContext, hookData);
3031
}
3132

33+
@Generated
3234
@Override
3335
public boolean equals(Object o) {
3436
if (o == null || getClass() != o.getClass()) {
@@ -42,6 +44,7 @@ public boolean equals(Object o) {
4244
&& Objects.equals(defaultValue, that.defaultValue);
4345
}
4446

47+
@Generated
4548
@Override
4649
public int hashCode() {
4750
return Objects.hash(flagKey, type, clientMetadata, providerMetadata, defaultValue);

0 commit comments

Comments
 (0)