Skip to content

Commit eb3b519

Browse files
Update Jackson 2.x to Jackson 3.0 for Spring Boot 4.0 compatibility
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 4a0258b commit eb3b519

189 files changed

Lines changed: 5205 additions & 7052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/core/src/main/java/dev/learning/xapi/samples/core/ExampleState.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ public class ExampleState {
1616
private String message;
1717
private Instant timestamp;
1818

19-
/**
20-
* Constructor for ExampleState.
21-
*/
19+
/** Constructor for ExampleState. */
2220
public ExampleState(String message, Instant timestamp) {
2321
super();
2422
this.message = message;
@@ -45,5 +43,4 @@ public void setTimestamp(Instant timestamp) {
4543
public String toString() {
4644
return "ExampleState [message=" + message + ", timestamp=" + timestamp + "]";
4745
}
48-
4946
}

samples/delete-activity-profile/src/main/java/dev/learning/xapi/samples/deleteactivityprofile/DeleteActivityProfileApplication.java

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
@SpringBootApplication
2121
public class DeleteActivityProfileApplication implements CommandLineRunner {
2222

23-
/**
24-
* Default xAPI client. Properties are picked automatically from application.properties.
25-
*/
26-
@Autowired
27-
private XapiClient client;
23+
/** Default xAPI client. Properties are picked automatically from application.properties. */
24+
@Autowired private XapiClient client;
2825

2926
public static void main(String[] args) {
3027
SpringApplication.run(DeleteActivityProfileApplication.class, args).close();
@@ -37,25 +34,21 @@ public void run(String... args) {
3734
postActivityProfile();
3835

3936
// Delete activity profile
40-
client.deleteActivityProfile(r -> r.activityId("https://example.com/activity/1")
41-
42-
.profileId("bookmark"))
43-
37+
client
38+
.deleteActivityProfile(
39+
r -> r.activityId("https://example.com/activity/1").profileId("bookmark"))
4440
.block();
45-
4641
}
4742

4843
private void postActivityProfile() {
4944

5045
// Post activity profile
51-
client.postActivityProfile(r -> r.activityId("https://example.com/activity/1")
52-
53-
.profileId("bookmark")
54-
55-
.activityProfile(new ExampleState("Hello World!", Instant.now())))
56-
46+
client
47+
.postActivityProfile(
48+
r ->
49+
r.activityId("https://example.com/activity/1")
50+
.profileId("bookmark")
51+
.activityProfile(new ExampleState("Hello World!", Instant.now())))
5752
.block();
58-
5953
}
60-
6154
}

samples/delete-agent-profile/src/main/java/dev/learning/xapi/samples/deleteagentprofile/DeleteAgentProfileApplication.java

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
@SpringBootApplication
2121
public class DeleteAgentProfileApplication implements CommandLineRunner {
2222

23-
/**
24-
* Default xAPI client. Properties are picked automatically from application.properties.
25-
*/
26-
@Autowired
27-
private XapiClient client;
23+
/** Default xAPI client. Properties are picked automatically from application.properties. */
24+
@Autowired private XapiClient client;
2825

2926
public static void main(String[] args) {
3027
SpringApplication.run(DeleteAgentProfileApplication.class, args).close();
@@ -39,25 +36,21 @@ public void run(String... args) {
3936
// Delete Agent Profile
4037
client
4138
.deleteAgentProfile(
42-
r -> r.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
43-
44-
.profileId("bookmark"))
45-
39+
r ->
40+
r.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
41+
.profileId("bookmark"))
4642
.block();
4743
}
4844

4945
private void postAgentProfile() {
5046

5147
// Post Profile
5248
client
53-
.postAgentProfile(r -> r.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
54-
55-
.profileId("bookmark")
56-
57-
.profile(new ExampleState("Hello World!", Instant.now())))
58-
49+
.postAgentProfile(
50+
r ->
51+
r.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
52+
.profileId("bookmark")
53+
.profile(new ExampleState("Hello World!", Instant.now())))
5954
.block();
60-
6155
}
62-
6356
}

samples/delete-state/src/main/java/dev/learning/xapi/samples/deletestate/DeleteStateApplication.java

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
@SpringBootApplication
2121
public class DeleteStateApplication implements CommandLineRunner {
2222

23-
/**
24-
* Default xAPI client. Properties are picked automatically from application.properties.
25-
*/
26-
@Autowired
27-
private XapiClient client;
23+
/** Default xAPI client. Properties are picked automatically from application.properties. */
24+
@Autowired private XapiClient client;
2825

2926
public static void main(String[] args) {
3027
SpringApplication.run(DeleteStateApplication.class, args).close();
@@ -37,33 +34,27 @@ public void run(String... args) {
3734
postState();
3835

3936
// Delete State
40-
client.deleteState(r -> r.activityId("https://example.com/activity/1")
41-
42-
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
43-
44-
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
45-
46-
.stateId("bookmark"))
47-
37+
client
38+
.deleteState(
39+
r ->
40+
r.activityId("https://example.com/activity/1")
41+
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
42+
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
43+
.stateId("bookmark"))
4844
.block();
49-
5045
}
5146

5247
private void postState() {
5348

5449
// Post State
55-
client.postState(r -> r.activityId("https://example.com/activity/1")
56-
57-
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
58-
59-
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
60-
61-
.stateId("bookmark")
62-
63-
.state(new ExampleState("Hello World!", Instant.now())))
64-
50+
client
51+
.postState(
52+
r ->
53+
r.activityId("https://example.com/activity/1")
54+
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
55+
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
56+
.stateId("bookmark")
57+
.state(new ExampleState("Hello World!", Instant.now())))
6558
.block();
66-
6759
}
68-
6960
}

samples/delete-states/src/main/java/dev/learning/xapi/samples/deletestates/DeleteStatesApplication.java

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
@SpringBootApplication
2121
public class DeleteStatesApplication implements CommandLineRunner {
2222

23-
/**
24-
* Default xAPI client. Properties are picked automatically from application.properties.
25-
*/
26-
@Autowired
27-
private XapiClient client;
23+
/** Default xAPI client. Properties are picked automatically from application.properties. */
24+
@Autowired private XapiClient client;
2825

2926
public static void main(String[] args) {
3027
SpringApplication.run(DeleteStatesApplication.class, args).close();
@@ -37,31 +34,26 @@ public void run(String... args) {
3734
postState();
3835

3936
// Delete states
40-
client.deleteStates(r -> r.activityId("https://example.com/activity/1")
41-
42-
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
43-
44-
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6"))
45-
37+
client
38+
.deleteStates(
39+
r ->
40+
r.activityId("https://example.com/activity/1")
41+
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
42+
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6"))
4643
.block();
47-
4844
}
4945

5046
private void postState() {
5147

5248
// Post State
53-
client.postState(r -> r.activityId("https://example.com/activity/1")
54-
55-
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
56-
57-
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
58-
59-
.stateId("bookmark")
60-
61-
.state(new ExampleState("Hello World!", Instant.now())))
62-
49+
client
50+
.postState(
51+
r ->
52+
r.activityId("https://example.com/activity/1")
53+
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"))
54+
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6")
55+
.stateId("bookmark")
56+
.state(new ExampleState("Hello World!", Instant.now())))
6357
.block();
64-
6558
}
66-
6759
}

samples/get-about/src/main/java/dev/learning/xapi/samples/getabout/GetAboutApplication.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
@SpringBootApplication
2121
public class GetAboutApplication implements CommandLineRunner {
2222

23-
/**
24-
* Default xAPI client. Properties are picked automatically from application.properties.
25-
*/
26-
@Autowired
27-
private XapiClient client;
23+
/** Default xAPI client. Properties are picked automatically from application.properties. */
24+
@Autowired private XapiClient client;
2825

2926
public static void main(String[] args) {
3027
SpringApplication.run(GetAboutApplication.class, args).close();
@@ -39,5 +36,4 @@ public void run(String... args) {
3936
// Print the returned activity to the console
4037
System.out.println(response.getBody());
4138
}
42-
4339
}

samples/get-activity-profile/src/main/java/dev/learning/xapi/samples/getactivityprofile/GetActivityProfileApplication.java

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@
2121
@SpringBootApplication
2222
public class GetActivityProfileApplication implements CommandLineRunner {
2323

24-
/**
25-
* Default xAPI client. Properties are picked automatically from application.properties.
26-
*/
27-
@Autowired
28-
private XapiClient client;
24+
/** Default xAPI client. Properties are picked automatically from application.properties. */
25+
@Autowired private XapiClient client;
2926

3027
public static void main(String[] args) {
3128
SpringApplication.run(GetActivityProfileApplication.class, args).close();
@@ -38,29 +35,26 @@ public void run(String... args) {
3835
postActivityProfile();
3936

4037
// Get activity profile
41-
ResponseEntity<ExampleState> response = client
42-
.getActivityProfile(r -> r.activityId("https://example.com/activity/1")
43-
44-
.profileId("bookmark"), ExampleState.class)
45-
46-
.block();
38+
ResponseEntity<ExampleState> response =
39+
client
40+
.getActivityProfile(
41+
r -> r.activityId("https://example.com/activity/1").profileId("bookmark"),
42+
ExampleState.class)
43+
.block();
4744

4845
// Print the returned activity profile to the console
4946
System.out.println(response.getBody());
50-
5147
}
5248

5349
private void postActivityProfile() {
5450

5551
// Post Profile
56-
client.postActivityProfile(r -> r.activityId("https://example.com/activity/1")
57-
58-
.profileId("bookmark")
59-
60-
.activityProfile(new ExampleState("Hello World!", Instant.now())))
61-
52+
client
53+
.postActivityProfile(
54+
r ->
55+
r.activityId("https://example.com/activity/1")
56+
.profileId("bookmark")
57+
.activityProfile(new ExampleState("Hello World!", Instant.now())))
6258
.block();
63-
6459
}
65-
6660
}

samples/get-activity-profiles/src/main/java/dev/learning/xapi/samples/getactivityprofiles/GetActivityProfilesApplication.java

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222
@SpringBootApplication
2323
public class GetActivityProfilesApplication implements CommandLineRunner {
2424

25-
/**
26-
* Default xAPI client. Properties are picked automatically from application.properties.
27-
*/
28-
@Autowired
29-
private XapiClient client;
25+
/** Default xAPI client. Properties are picked automatically from application.properties. */
26+
@Autowired private XapiClient client;
3027

3128
public static void main(String[] args) {
3229
SpringApplication.run(GetActivityProfilesApplication.class, args).close();
@@ -40,9 +37,7 @@ public void run(String... args) {
4037

4138
// Get Activity Profiles
4239
ResponseEntity<List<String>> response =
43-
client.getActivityProfiles(r -> r.activityId("https://example.com/activity/1"))
44-
45-
.block();
40+
client.getActivityProfiles(r -> r.activityId("https://example.com/activity/1")).block();
4641

4742
// Print the each returned activity profile id to the console
4843
response.getBody().stream().forEach(System.out::println);
@@ -51,14 +46,12 @@ public void run(String... args) {
5146
private void postActivityProfile() {
5247

5348
// Post Profile
54-
client.postActivityProfile(r -> r.activityId("https://example.com/activity/1")
55-
56-
.profileId("bookmark")
57-
58-
.activityProfile(new ExampleState("Hello World!", Instant.now())))
59-
49+
client
50+
.postActivityProfile(
51+
r ->
52+
r.activityId("https://example.com/activity/1")
53+
.profileId("bookmark")
54+
.activityProfile(new ExampleState("Hello World!", Instant.now())))
6055
.block();
61-
6256
}
63-
6457
}

0 commit comments

Comments
 (0)