Skip to content

Commit 010923d

Browse files
committed
Update changelog with all changes since v1.0.7
1 parent c640e98 commit 010923d

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,40 @@ var config = new ResumeSessionConfig()
3131
var session = client.resumeSession(sessionId, config).get();
3232
```
3333

34+
#### EventErrorHandler for Custom Error Handling
35+
Added `EventErrorHandler` interface for custom handling of exceptions thrown by event handlers. Set via `session.setEventErrorHandler()` to receive the event and exception when a handler fails.
36+
37+
```java
38+
session.setEventErrorHandler((event, exception) -> {
39+
logger.error("Handler failed for event: " + event.getType(), exception);
40+
});
41+
```
42+
43+
#### Type-Safe Event Handlers
44+
Promoted type-safe `on(Class<T>, Consumer<T>)` event handlers as the primary API. Handlers now receive strongly-typed events instead of raw `AbstractSessionEvent`.
45+
46+
```java
47+
session.on(AssistantMessageEvent.class, msg -> {
48+
System.out.println(msg.getData().getContent());
49+
});
50+
```
51+
52+
#### SpotBugs Static Analysis
53+
Integrated SpotBugs for static code analysis with exclusion filters for `events` and `json` packages.
54+
3455
### Changed
3556

3657
- **Copilot CLI**: Minimum version updated to **0.0.405**
58+
- **CopilotClient**: Made `final` to prevent Finalizer attacks (security hardening)
59+
- **JBang Example**: Refactored `jbang-example.java` with streamlined session creation and usage metrics display
60+
- **Code Style**: Use `var` for local variable type inference throughout the codebase
61+
62+
### Fixed
63+
64+
- **SpotBugs OS_OPEN_STREAM**: Wrap `BufferedReader` in try-with-resources to prevent resource leaks
65+
- **SpotBugs REC_CATCH_EXCEPTION**: Narrow exception catch in `JsonRpcClient.handleMessage()`
66+
- **SpotBugs DM_DEFAULT_ENCODING**: Add explicit UTF-8 charset to `InputStreamReader`
67+
- **SpotBugs EI_EXPOSE_REP**: Add defensive copies to collection getters in events and JSON packages
3768

3869
## [1.0.7] - 2026-02-05
3970

0 commit comments

Comments
 (0)