-
Notifications
You must be signed in to change notification settings - Fork 175
Add custom annotation sample #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom annotation sample #734
Conversation
87e57ae to
fe24ae8
Compare
| public static class ActivityInboundCallsInterceptorAnnotation | ||
| extends io.temporal.common.interceptors.ActivityInboundCallsInterceptorBase { | ||
| private final ActivityInboundCallsInterceptor next; | ||
| private Set<Class<? extends Exception>> benignExceptionTypes = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantic, can ignore
| private Set<Class<? extends Exception>> benignExceptionTypes = new HashSet<>(); | |
| private Set<Class<? extends Exception>> benignExceptionTypes = Collections.emptySet<>(); |
| if (benignExceptionTypes.isEmpty()) { | ||
| return next.execute(input); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (benignExceptionTypes.isEmpty()) { | |
| return next.execute(input); | |
| } |
Pedantic, but probably no value in this extra code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if tests are needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing really to show in the tests here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to prove the interceptor code even works (and continues to). We have had issues in other SDK samples repos where our lack of tests have caused us to miss when someone broke something, and we only found out when a human user manually tried to run the sample again. But up to you, non-blocking.
Add a sample showing how to create a custom annotation to customize activity type.