Skip to content

Commit 1de7aea

Browse files
committed
fixup: add default method for interface
Signed-off-by: Simon Schrottner <[email protected]>
1 parent 0dee929 commit 1de7aea

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ static <T> HookContext<T> from(
3333
.providerMetadata(providerMetadata)
3434
.ctx(ctx)
3535
.defaultValue(defaultValue)
36-
.hookData(null) // Explicitly set to null for backward compatibility
3736
.build();
3837
}
3938

@@ -56,5 +55,7 @@ static <T> HookContextWithoutDataBuilder<T> builder() {
5655

5756
Metadata getProviderMetadata();
5857

59-
HookData getHookData();
58+
default HookData getHookData() {
59+
return null;
60+
}
6061
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ class HookContextWithoutData<T> implements HookContext<T> {
2424

2525
ClientMetadata clientMetadata;
2626
Metadata providerMetadata;
27-
28-
/**
29-
* Hook data provides a way for hooks to maintain state across their execution stages.
30-
* Each hook instance gets its own isolated data store.
31-
*/
32-
HookData hookData;
3327
}

0 commit comments

Comments
 (0)