From 41dfc5260d308941ebd4f2b12b92acdb7d4f1b62 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:46:24 +0000 Subject: [PATCH 1/3] Initial plan From 33ba2bf7ee03efc8461b51a8a5a8cbb754554122 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:56:24 +0000 Subject: [PATCH 2/3] Remove unnecessary IOException from 14 test methods Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com> --- .../test/java/dev/learning/xapi/model/AboutTests.java | 2 +- .../java/dev/learning/xapi/model/AccountTests.java | 2 +- .../java/dev/learning/xapi/model/ActivityTests.java | 2 +- .../learning/xapi/model/ContextActivitiesTests.java | 8 ++++---- .../test/java/dev/learning/xapi/model/GroupTests.java | 10 +++++----- .../test/java/dev/learning/xapi/model/ResultTests.java | 2 +- .../dev/learning/xapi/model/StatementResultTest.java | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/AboutTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/AboutTests.java index c409800c..730231e2 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/AboutTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/AboutTests.java @@ -138,7 +138,7 @@ void whenSerializingAboutWithExtensionsThenResultIsEqualToExpectedJson() throws } @Test - void whenCallingToStringThenResultIsExpected() throws IOException { + void whenCallingToStringThenResultIsExpected() { final var extensions = new LinkedHashMap(); extensions.put(URI.create("http://url"), "www.example.com"); diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/AccountTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/AccountTests.java index 26369469..6b7e8978 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/AccountTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/AccountTests.java @@ -94,7 +94,7 @@ void whenSerializingAccountThenResultIsEqualToExpectedJson() throws IOException } @Test - void whenCallingToStringThenResultIsExpected() throws IOException { + void whenCallingToStringThenResultIsExpected() { final var account = Account.builder() diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/ActivityTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/ActivityTests.java index f4d0a983..546caf98 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/ActivityTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/ActivityTests.java @@ -109,7 +109,7 @@ void whenSerializingActivityThenResultIsEqualToExpectedJson() throws IOException } @Test - void whenCallingToStringThenResultIsExpected() throws IOException { + void whenCallingToStringThenResultIsExpected() { final var activity = Activity.builder() diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/ContextActivitiesTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/ContextActivitiesTests.java index fc2df95b..009a55fc 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/ContextActivitiesTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/ContextActivitiesTests.java @@ -134,7 +134,7 @@ void whenCallingToStringThenResultIsExpected() throws IOException { } @Test - void whenBuildingContextActivitiesWithTwoParentsThenParentIshasSizeTwo() throws IOException { + void whenBuildingContextActivitiesWithTwoParentsThenParentIshasSizeTwo() { // When Building ContextActivities With Two Parents final var contextActivities = ContextActivities.builder() @@ -151,7 +151,7 @@ void whenBuildingContextActivitiesWithTwoParentsThenParentIshasSizeTwo() throws } @Test - void whenBuildingContextActivitiesWithTwoGroupingThenGroupingIshasSizeTwo() throws IOException { + void whenBuildingContextActivitiesWithTwoGroupingThenGroupingIshasSizeTwo() { // When Building ContextActivities With Two Groupings final var contextActivities = ContextActivities.builder() @@ -168,7 +168,7 @@ void whenBuildingContextActivitiesWithTwoGroupingThenGroupingIshasSizeTwo() thro } @Test - void whenBuildingContextActivitiesWithTwoOtherThenOtherIshasSizeTwo() throws IOException { + void whenBuildingContextActivitiesWithTwoOtherThenOtherIshasSizeTwo() { // When Building ContextActivities With Two Others final var contextActivities = ContextActivities.builder() @@ -185,7 +185,7 @@ void whenBuildingContextActivitiesWithTwoOtherThenOtherIshasSizeTwo() throws IOE } @Test - void whenBuildingContextActivitiesWithTwoCategoriesThenCategoryIshasSizeTwo() throws IOException { + void whenBuildingContextActivitiesWithTwoCategoriesThenCategoryIshasSizeTwo() { // When Building ContextActivities With Two Categories final var contextActivities = ContextActivities.builder() diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/GroupTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/GroupTests.java index 82afb7f7..012d62c2 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/GroupTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/GroupTests.java @@ -109,7 +109,7 @@ void whenCallingToStringThenResultIsExpected() throws IOException { } @Test - void givenGroupWithNameAndMembersWhenCallingIsAnonymousThenResultIsTrue() throws IOException { + void givenGroupWithNameAndMembersWhenCallingIsAnonymousThenResultIsTrue() { // Given Group With Name And Members final Group group = Group.builder() @@ -131,7 +131,7 @@ void givenGroupWithNameAndMembersWhenCallingIsAnonymousThenResultIsTrue() throws } @Test - void givenGroupWithNameAndNoMembersWhenCallingIsAnonymousThenResultIsFalse() throws IOException { + void givenGroupWithNameAndNoMembersWhenCallingIsAnonymousThenResultIsFalse() { // Given Group With Name And Empty Members final Group group = Group.builder() @@ -172,7 +172,7 @@ void givenGroupWithNameAndNullMembersWhenCallingIsAnonymousThenResultIsFalse() } @Test - void givenGroupWithMboxAndMembersWhenCallingIsAnonymousThenResultIsFalse() throws IOException { + void givenGroupWithMboxAndMembersWhenCallingIsAnonymousThenResultIsFalse() { // Given Group With MBox And Members final Group group = Group.builder() @@ -217,7 +217,7 @@ void givenGroupWithMboxSha1sumAndMembersWhenCallingIsAnonymousThenResultIsFalse( } @Test - void givenGroupWithOpenIDAndMembersWhenCallingIsAnonymousThenResultIsFalse() throws IOException { + void givenGroupWithOpenIDAndMembersWhenCallingIsAnonymousThenResultIsFalse() { // Given Group With OpenID And Members final Group group = Group.builder() @@ -241,7 +241,7 @@ void givenGroupWithOpenIDAndMembersWhenCallingIsAnonymousThenResultIsFalse() thr @Test - void givenGroupWithAccountAndMembersWhenCallingIsAnonymousThenResultIsFalse() throws IOException { + void givenGroupWithAccountAndMembersWhenCallingIsAnonymousThenResultIsFalse() { // Given Group With Account And Members final Group group = Group.builder() diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/ResultTests.java b/xapi-model/src/test/java/dev/learning/xapi/model/ResultTests.java index 2127a852..53dd9a34 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/ResultTests.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/ResultTests.java @@ -130,7 +130,7 @@ void whenSerializingResultThenResultIsEqualToExpectedJson() throws IOException { } @Test - void whenCallingToStringThenResultIsExpected() throws IOException { + void whenCallingToStringThenResultIsExpected() { final var resultInstance = Result.builder() diff --git a/xapi-model/src/test/java/dev/learning/xapi/model/StatementResultTest.java b/xapi-model/src/test/java/dev/learning/xapi/model/StatementResultTest.java index 71af7999..a2f92411 100644 --- a/xapi-model/src/test/java/dev/learning/xapi/model/StatementResultTest.java +++ b/xapi-model/src/test/java/dev/learning/xapi/model/StatementResultTest.java @@ -88,7 +88,7 @@ void whenSerializingStatementResultThenResultIsEqualToExpectedJson() throws IOEx } @Test - void whenCallingToStringThenResultIsExpected() throws IOException { + void whenCallingToStringThenResultIsExpected() { final var statementResult = StatementResult.builder() From 6d0f0f6fe44e29d1885aefa78e84e663142785a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:59:57 +0000 Subject: [PATCH 3/3] Remove redundant FileNotFoundException declaration Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com> --- .../poststatement/GetStatementWithAttachmentApplication.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/get-statement-with-attachment/src/main/java/dev/learning/xapi/samples/poststatement/GetStatementWithAttachmentApplication.java b/samples/get-statement-with-attachment/src/main/java/dev/learning/xapi/samples/poststatement/GetStatementWithAttachmentApplication.java index 8d7e4fe0..0ca96fa7 100644 --- a/samples/get-statement-with-attachment/src/main/java/dev/learning/xapi/samples/poststatement/GetStatementWithAttachmentApplication.java +++ b/samples/get-statement-with-attachment/src/main/java/dev/learning/xapi/samples/poststatement/GetStatementWithAttachmentApplication.java @@ -7,7 +7,6 @@ import dev.learning.xapi.client.XapiClient; import dev.learning.xapi.model.Statement; import dev.learning.xapi.model.Verb; -import java.io.FileNotFoundException; import java.io.IOException; import java.net.URI; import java.nio.file.Files; @@ -63,7 +62,7 @@ public void run(String... args) throws Exception { } - private UUID postStatement() throws FileNotFoundException, IOException { + private UUID postStatement() throws IOException { // Load jpg attachment from class-path var data = Files.readAllBytes(ResourceUtils.getFile("classpath:example.jpg").toPath());