You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. **Extracting Common Run Logic:** A new private method `run` is introduced to encapsulate the common setup and execution flow shared by both `runAsync` and `runLive`. This includes creating the `InvocationContext`, setting up tracing, and handling before/after callbacks.
2. **Reducing Duplication:** Both `runAsync` and `runLive` now call this new `run` method, passing their specific implementation (`runAsyncImpl` or `runLiveImpl`) as a function. This eliminates a significant amount of duplicated code.
3. **Minor Cleanups:**
* The `createInvocationContext` method now uses `parentContext.branch().filter(...).ifPresent(...)` for a more concise optional handling.
* An unnecessary `agentCallbacks == null` check is removed from `callCallback`, as the list should not be null.
PiperOrigin-RevId: 868646905
0 commit comments