Skip to content

Commit f2ac53a

Browse files
Replace the chain of if/else with a switch expression. (#423)
* Replace the chain of if/else with a switch expression. * Update checkstyle
1 parent e9c94b0 commit f2ac53a

File tree

36 files changed

+61
-15
lines changed

36 files changed

+61
-15
lines changed

pom.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<properties>
1818
<java.version>25</java.version>
1919
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
20-
<maven-checkstyle-plugin.version>3.5.0</maven-checkstyle-plugin.version>
21-
<checkstyle.version>10.6.0</checkstyle.version>
20+
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
21+
<checkstyle.version>12.1.2</checkstyle.version>
2222
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
2323
<jjwt.version>0.12.6</jjwt.version>
2424
<okhttp.version>5.3.2</okhttp.version>
@@ -91,6 +91,13 @@
9191
<groupId>org.apache.maven.plugins</groupId>
9292
<artifactId>maven-checkstyle-plugin</artifactId>
9393
<version>${maven-checkstyle-plugin.version}</version>
94+
<dependencies>
95+
<dependency>
96+
<groupId>com.puppycrawl.tools</groupId>
97+
<artifactId>checkstyle</artifactId>
98+
<version>${checkstyle.version}</version>
99+
</dependency>
100+
</dependencies>
94101
</plugin>
95102
<plugin>
96103
<groupId>org.apache.maven.plugins</groupId>
@@ -136,7 +143,7 @@
136143
<plugin>
137144
<groupId>org.apache.maven.plugins</groupId>
138145
<artifactId>maven-gpg-plugin</artifactId>
139-
<version>3.2.7</version>
146+
<version>${maven-gpg-plugin.version}</version>
140147
<executions>
141148
<execution>
142149
<id>sign-artifacts</id>
@@ -188,7 +195,7 @@
188195
<plugin>
189196
<groupId>org.sonatype.central</groupId>
190197
<artifactId>central-publishing-maven-plugin</artifactId>
191-
<version>0.9.0</version>
198+
<version>${central-publishing-maven-plugin.version}</version>
192199
<extensions>true</extensions>
193200
<configuration>
194201
<publishingServerId>central</publishingServerId>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class DeleteActivityProfileApplication implements CommandLineRunner {
2323
/** Default xAPI client. Properties are picked automatically from application.properties. */
2424
@Autowired private XapiClient client;
2525

26+
/** Main method to start the application. */
2627
public static void main(String[] args) {
2728
SpringApplication.run(DeleteActivityProfileApplication.class, args).close();
2829
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class DeleteAgentProfileApplication implements CommandLineRunner {
2323
/** Default xAPI client. Properties are picked automatically from application.properties. */
2424
@Autowired private XapiClient client;
2525

26+
/** Main method to start the application. */
2627
public static void main(String[] args) {
2728
SpringApplication.run(DeleteAgentProfileApplication.class, args).close();
2829
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class DeleteStateApplication implements CommandLineRunner {
2323
/** Default xAPI client. Properties are picked automatically from application.properties. */
2424
@Autowired private XapiClient client;
2525

26+
/** Main method to start the application. */
2627
public static void main(String[] args) {
2728
SpringApplication.run(DeleteStateApplication.class, args).close();
2829
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class DeleteStatesApplication implements CommandLineRunner {
2323
/** Default xAPI client. Properties are picked automatically from application.properties. */
2424
@Autowired private XapiClient client;
2525

26+
/** Main method to start the application. */
2627
public static void main(String[] args) {
2728
SpringApplication.run(DeleteStatesApplication.class, args).close();
2829
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class GetAboutApplication implements CommandLineRunner {
2323
/** Default xAPI client. Properties are picked automatically from application.properties. */
2424
@Autowired private XapiClient client;
2525

26+
/** Main method to start the application. */
2627
public static void main(String[] args) {
2728
SpringApplication.run(GetAboutApplication.class, args).close();
2829
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class GetActivityProfileApplication implements CommandLineRunner {
2424
/** Default xAPI client. Properties are picked automatically from application.properties. */
2525
@Autowired private XapiClient client;
2626

27+
/** Main method to start the application. */
2728
public static void main(String[] args) {
2829
SpringApplication.run(GetActivityProfileApplication.class, args).close();
2930
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class GetActivityProfilesApplication implements CommandLineRunner {
2525
/** Default xAPI client. Properties are picked automatically from application.properties. */
2626
@Autowired private XapiClient client;
2727

28+
/** Main method to start the application. */
2829
public static void main(String[] args) {
2930
SpringApplication.run(GetActivityProfilesApplication.class, args).close();
3031
}

samples/get-activity/src/main/java/dev/learning/xapi/samples/getactivity/GetActivityApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class GetActivityApplication implements CommandLineRunner {
2727
/** Default xAPI client. Properties are picked automatically from application.properties. */
2828
@Autowired private XapiClient client;
2929

30+
/** Main method to start the application. */
3031
public static void main(String[] args) {
3132
SpringApplication.run(GetActivityApplication.class, args).close();
3233
}

samples/get-agent-profile/src/main/java/dev/learning/xapi/samples/getagentprofile/GetAgentProfileApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class GetAgentProfileApplication implements CommandLineRunner {
2424
/** Default xAPI client. Properties are picked automatically from application.properties. */
2525
@Autowired private XapiClient client;
2626

27+
/** Main method to start the application. */
2728
public static void main(String[] args) {
2829
SpringApplication.run(GetAgentProfileApplication.class, args).close();
2930
}

0 commit comments

Comments
 (0)