Skip to content

Commit c3d4433

Browse files
authored
Merge pull request #107 from killbill/java2x
Java 21 and jakarta namespace migration PR
2 parents 5e45cc0 + 9ae0c7a commit c3d4433

13 files changed

Lines changed: 53 additions & 49 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
ci:
10-
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@main
10+
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@java21

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
analyze:
10-
uses: killbill/gh-actions-shared/.github/workflows/codeql-analysis.yml@main
10+
uses: killbill/gh-actions-shared/.github/workflows/codeql-analysis.yml@java21

.github/workflows/release.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
steps:
2828
- name: Checkout code
2929
if: github.event.inputs.perform_version == ''
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v6
3131
- name: Checkout full repository
3232
# Required when performing an existing release.
3333
if: github.event.inputs.perform_version != ''
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v6
3535
with:
3636
fetch-depth: '0'
3737
- name: Setup git user
@@ -43,9 +43,10 @@ jobs:
4343
git config --global user.name "Kill Bill core team"
4444
git config --global url."https://${BUILD_USER}:${BUILD_TOKEN}@github.com/".insteadOf "git@github.com:"
4545
- name: Configure Java
46-
uses: actions/setup-java@v1
46+
uses: actions/setup-java@v5
4747
with:
48-
java-version: 11
48+
java-version: 21
49+
distribution: temurin
4950
- name: Download Java dependencies
5051
# We do as much as we can, but it may not be enough (https://issues.apache.org/jira/browse/MDEP-82)
5152
run: |
@@ -64,9 +65,9 @@ jobs:
6465
# Will be pushed as part of the release process, only if the release is successful
6566
git commit -m "pom.xml: update killbill-oss-parent to ${{ github.event.inputs.parent_version }}"
6667
- name: Configure settings.xml for release
67-
uses: actions/setup-java@v3
68+
uses: actions/setup-java@v5
6869
with:
69-
java-version: 11
70+
java-version: 21
7071
distribution: temurin
7172
server-id: central
7273
server-username: MAVEN_USERNAME

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
snapshot:
9-
uses: killbill/gh-actions-shared/.github/workflows/snapshot.yml@main
9+
uses: killbill/gh-actions-shared/.github/workflows/snapshot.yml@java21
1010
secrets:
1111
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
1212
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ on:
77

88
jobs:
99
sync:
10-
uses: killbill/gh-actions-shared/.github/workflows/sync.yml@main
10+
uses: killbill/gh-actions-shared/.github/workflows/sync.yml@java21
1111
secrets:
1212
CREATE_PULL_REQUEST_SSH_KEY: ${{ secrets.CREATE_PULL_REQUEST_SSH_KEY }}

pom.xml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
<parent>
2222
<groupId>org.kill-bill.billing</groupId>
2323
<artifactId>killbill-oss-parent</artifactId>
24-
<version>0.146.74</version>
24+
<version>0.147.3</version>
2525
</parent>
2626
<groupId>org.kill-bill.billing.plugin.java</groupId>
2727
<artifactId>killbill-base-plugin</artifactId>
28-
<version>5.1.13-SNAPSHOT</version>
28+
<version>5.2.0-SNAPSHOT</version>
2929
<packaging>jar</packaging>
3030
<name>Kill Bill base OSGI plugin</name>
3131
<description>Kill Bill base OSGI plugin</description>
@@ -71,10 +71,6 @@
7171
<groupId>com.fasterxml.jackson.datatype</groupId>
7272
<artifactId>jackson-datatype-joda</artifactId>
7373
</dependency>
74-
<dependency>
75-
<groupId>com.github.spotbugs</groupId>
76-
<artifactId>spotbugs-annotations</artifactId>
77-
</dependency>
7874
<dependency>
7975
<groupId>com.google.code.findbugs</groupId>
8076
<artifactId>jsr305</artifactId>
@@ -127,18 +123,6 @@
127123
<groupId>org.joda</groupId>
128124
<artifactId>joda-money</artifactId>
129125
</dependency>
130-
<dependency>
131-
<groupId>org.jooby</groupId>
132-
<artifactId>jooby</artifactId>
133-
</dependency>
134-
<dependency>
135-
<groupId>org.jooby</groupId>
136-
<artifactId>jooby-jackson</artifactId>
137-
</dependency>
138-
<dependency>
139-
<groupId>org.jooby</groupId>
140-
<artifactId>jooby-servlet</artifactId>
141-
</dependency>
142126
<dependency>
143127
<groupId>org.jooq</groupId>
144128
<artifactId>jooq</artifactId>
@@ -241,6 +225,10 @@
241225
<artifactId>killbill-embeddeddb-postgresql</artifactId>
242226
<scope>test</scope>
243227
</dependency>
228+
<dependency>
229+
<groupId>org.kill-bill.commons</groupId>
230+
<artifactId>killbill-jooby</artifactId>
231+
</dependency>
244232
<dependency>
245233
<groupId>org.kill-bill.commons</groupId>
246234
<artifactId>killbill-utils</artifactId>

spotbugs-exclude.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,19 @@
1818
<FindBugsFilter>
1919
<Bug pattern="EI_EXPOSE_REP"/>
2020
<Bug pattern="EI_EXPOSE_REP2"/>
21+
<!-- Constructor validates and normalizes input URLs, and the checked exception is part of the public API. -->
22+
<Match>
23+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
24+
<Class name="org.killbill.billing.plugin.api.payment.PluginHostedPaymentPageFormDescriptor"/>
25+
</Match>
26+
<!-- Constructor performs DB metadata and schema resolution eagerly, and SQL failures are part of the public API. -->
27+
<Match>
28+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
29+
<Class name="org.killbill.billing.plugin.dao.PluginDao"/>
30+
</Match>
31+
<!-- Constructor builds SSL/HTTP client state eagerly, and security setup failures are part of the public API. -->
32+
<Match>
33+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
34+
<Class name="org.killbill.billing.plugin.util.http.HttpClient"/>
35+
</Match>
2136
</FindBugsFilter>

src/main/java/org/killbill/billing/plugin/api/PluginProperties.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import org.killbill.commons.utils.Strings;
3434
import org.killbill.commons.utils.collect.Iterables;
3535

36-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
37-
3836
public abstract class PluginProperties {
3937

4038
// Last one has precedence
@@ -122,7 +120,6 @@ public static Iterable<PluginProperty> findPluginProperties(final Pattern keyPat
122120
.collect(Collectors.toUnmodifiableSet());
123121
}
124122

125-
@SuppressFBWarnings("WMI_WRONG_MAP_ITERATOR")
126123
public static <K, V> List<PluginProperty> buildPluginProperties(@Nullable final Map<K, V> data) {
127124
if (data == null || data.isEmpty()) {
128125
return Collections.emptyList();

src/main/java/org/killbill/billing/plugin/core/JoobyServlet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
import java.io.IOException;
2222

23-
import javax.servlet.ServletException;
24-
import javax.servlet.ServletRequest;
25-
import javax.servlet.http.HttpServletRequest;
26-
import javax.servlet.http.HttpServletResponse;
23+
import jakarta.servlet.ServletException;
24+
import jakarta.servlet.ServletRequest;
25+
import jakarta.servlet.http.HttpServletRequest;
26+
import jakarta.servlet.http.HttpServletResponse;
2727

2828
import org.jooby.Sse;
2929
import org.jooby.servlet.ServletServletRequest;

src/main/java/org/killbill/billing/plugin/core/PluginServlet.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
import java.util.regex.Pattern;
2727

2828
import javax.annotation.Nullable;
29-
import javax.servlet.ServletRequest;
30-
import javax.servlet.ServletResponse;
31-
import javax.servlet.http.HttpServlet;
32-
import javax.servlet.http.HttpServletRequest;
33-
import javax.servlet.http.HttpServletResponse;
29+
30+
import jakarta.servlet.ServletRequest;
31+
import jakarta.servlet.ServletResponse;
32+
import jakarta.servlet.http.HttpServlet;
33+
import jakarta.servlet.http.HttpServletRequest;
34+
import jakarta.servlet.http.HttpServletResponse;
3435

3536
import org.joda.time.LocalDate;
3637
import org.joda.time.format.DateTimeFormat;

0 commit comments

Comments
 (0)