Skip to content

Commit 3ba3f2c

Browse files
committed
Don't have to implement each method on a hook, just the ones we care about.
1 parent 7dfe0a3 commit 3ba3f2c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/src/main/java/javasdk/Hook.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package javasdk;
22

33
// TODO: interface? or abstract class?
4-
public interface Hook<T> {
5-
void before(HookContext<T> ctx);
6-
void after(HookContext<T> ctx, FlagEvaluationDetails<T> details);
7-
void error(HookContext<T> ctx, Exception error);
8-
void afterAll(HookContext<T> ctx);
4+
public abstract class Hook<T> {
5+
void before(HookContext<T> ctx) {}
6+
void after(HookContext<T> ctx, FlagEvaluationDetails<T> details) {}
7+
void error(HookContext<T> ctx, Exception error) {}
8+
void afterAll(HookContext<T> ctx) {}
99
}

0 commit comments

Comments
 (0)