No longer support a list of executed hooks.

This commit is contained in:
Justin Abrahms 2022-05-08 15:38:23 -07:00
parent f1223534ba
commit 3da9a635ef
No known key found for this signature in database
GPG Key ID: 599E2E12011DC474
1 changed files with 0 additions and 4 deletions

View File

@ -72,7 +72,6 @@ public class OpenFeatureClient implements Client {
} else {
details.errorCode = ErrorCode.GENERAL;
}
details.executedHooks = hookCtx.executedHooks;
} finally {
this.afterAllHooks(hookCtx, mergedHooks);
}
@ -82,21 +81,18 @@ public class OpenFeatureClient implements Client {
private void afterAllHooks(HookContext hookCtx, List<Hook> hooks) {
for (Hook hook : hooks) {
hookCtx.executedHooks.addAfterAll(hook);
hook.afterAll(hookCtx);
}
}
private <T> void afterHooks(HookContext hookContext, FlagEvaluationDetails<T> details, List<Hook> hooks) {
for (Hook hook : hooks) {
hookContext.executedHooks.addAfter(hook);
hook.after(hookContext, details);
}
}
private HookContext beforeHooks(HookContext hookCtx, List<Hook> hooks) {
for (Hook hook : hooks) {
hookCtx.executedHooks.addBefore(hook);
hook.before(hookCtx);
// TODO: Merge returned context w/ hook context object
}