Skip to content

Commit 7e7b283

Browse files
committed
Fix residual old-package references and rename SessionEventParserTest
The migration commit (da9ec9c) replaced com.github.copilot.sdk.events with com.github.copilot.sdk.generated across all src/ files but missed four non-source files that still referenced the old package: 1. jbang-example.java — updated imports from events.AssistantMessageEvent and events.SessionUsageInfoEvent to generated equivalents. 2. README.md — updated Quick Start imports to use generated package. 3. .github/copilot-instructions.md — updated Package Structure section to describe com.github.copilot.sdk.generated instead of the deleted com.github.copilot.sdk.events package. 4. config/spotbugs/spotbugs-exclude.xml — changed SpotBugs exclusion from com.github.copilot.sdk.events to com.github.copilot.sdk.generated, and updated the comment to match. Also renamed SessionEventParserTest.java to SessionEventDeserializationTest.java (class name updated to match) since the test no longer exercises the deleted SessionEventParser class — it tests Jackson-native deserialization via ObjectMapper.readValue(json, SessionEvent.class). Build verified: 553 tests, 0 failures, BUILD SUCCESS. were updated. mvn verify passes with 556 tests, 0 failures, 0 errors.
1 parent da9ec9c commit 7e7b283

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ mvn test -Dtest=CopilotClientTest
7777

7878
- `com.github.copilot.sdk` - Core classes (CopilotClient, CopilotSession, JsonRpcClient)
7979
- `com.github.copilot.sdk.json` - DTOs, request/response types, handler interfaces (SessionConfig, MessageOptions, ToolDefinition, etc.)
80-
- `com.github.copilot.sdk.events` - Event types for session streaming (AssistantMessageEvent, SessionIdleEvent, ToolExecutionStartEvent, etc.)
80+
- `com.github.copilot.sdk.generated` - Generated event types for session streaming (SessionEvent, AssistantMessageEvent, SessionIdleEvent, ToolExecutionStartEvent, etc.)
8181

8282
### Test Infrastructure
8383

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ implementation 'com.github:copilot-sdk-java:0.2.2-java.1'
6767

6868
```java
6969
import com.github.copilot.sdk.CopilotClient;
70-
import com.github.copilot.sdk.events.AssistantMessageEvent;
71-
import com.github.copilot.sdk.events.SessionUsageInfoEvent;
70+
import com.github.copilot.sdk.generated.AssistantMessageEvent;
71+
import com.github.copilot.sdk.generated.SessionUsageInfoEvent;
7272
import com.github.copilot.sdk.json.CopilotClientOptions;
7373
import com.github.copilot.sdk.json.MessageOptions;
7474
import com.github.copilot.sdk.json.PermissionHandler;

config/spotbugs/spotbugs-exclude.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<!--
33
SpotBugs exclusion filter for the Copilot SDK.
44
5-
The 'events' and 'json' packages contain Jackson-deserialized DTOs where
5+
The 'generated' and 'json' packages contain Jackson-deserialized DTOs where
66
returning mutable internal representations (EI_EXPOSE_REP) and storing
77
references to mutable objects (EI_EXPOSE_REP2) is intentional and expected.
88
Making defensive copies would add overhead without meaningful security
99
benefit for these read-only data transfer objects.
1010
-->
1111
<FindBugsFilter>
1212
<Match>
13-
<Package name="com.github.copilot.sdk.events"/>
13+
<Package name="com.github.copilot.sdk.generated"/>
1414
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
1515
</Match>
1616
<Match>

jbang-example.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
!
22
//DEPS com.github:copilot-sdk-java:0.2.2-java.1
33
import com.github.copilot.sdk.CopilotClient;
4-
import com.github.copilot.sdk.events.AssistantMessageEvent;
5-
import com.github.copilot.sdk.events.SessionUsageInfoEvent;
4+
import com.github.copilot.sdk.generated.AssistantMessageEvent;
5+
import com.github.copilot.sdk.generated.SessionUsageInfoEvent;
66
import com.github.copilot.sdk.json.MessageOptions;
77
import com.github.copilot.sdk.json.PermissionHandler;
88
import com.github.copilot.sdk.json.SessionConfig;

src/test/java/com/github/copilot/sdk/SessionEventParserTest.java renamed to src/test/java/com/github/copilot/sdk/SessionEventDeserializationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
import com.github.copilot.sdk.generated.*;
1616

1717
/**
18-
* Tests for session event parsing.
18+
* Tests for session event deserialization.
1919
* <p>
2020
* These are unit tests that verify JSON deserialization works correctly for all
2121
* event types supported by the SDK.
2222
* </p>
2323
*/
24-
public class SessionEventParserTest {
24+
public class SessionEventDeserializationTest {
2525

2626
private static final ObjectMapper MAPPER = JsonRpcClient.getObjectMapper();
2727

0 commit comments

Comments
 (0)