Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2dfc4d8
jooby: Fork Jooby 1.6.9 into killbill-commons
xsalefter Mar 5, 2026
fb897dd
jooby: Adapt dependencies and move PowerMock-dependent tests
xsalefter Mar 7, 2026
186161f
jooby: Rewrite MockUnit and migrate 44 simple tests to Mockito 5
xsalefter Mar 7, 2026
ede434c
jooby: Migrate 12 mockStatic EasyMock tests to Mockito 5
xsalefter Mar 14, 2026
bfdba98
jooby: Migrate 5 mockConstructor EasyMock tests to Mockito 5
xsalefter Mar 14, 2026
6866f23
jooby: Migrate complex tests and document EasyMock-to-Mockito migration
xsalefter Apr 2, 2026
8ff8db0
jooby: Finalize test migration: HttpClient deps, utilities, remove Ea…
xsalefter Apr 2, 2026
4e9f7ce
jooby: Fix upstream infinite recursion bug and triage SpotBugs exclus…
xsalefter Apr 2, 2026
1d94df4
jooby: Remove jackson-annotations dependency and unused JsonView test
xsalefter Apr 2, 2026
341b99e
jooby: Fix ReDoS vulnerabilities in route pattern and PEM parsing regex
xsalefter Apr 2, 2026
8c764a1
jooby: add fix for various nit
xsalefter Apr 3, 2026
54ab80e
update minor version from 0.26 to 0.27
xsalefter Apr 3, 2026
c115581
Merge pull request #194 from xsalefter/fork-jooby
xsalefter Apr 3, 2026
f7afca2
jooby: restore deferred tests
xsalefter Apr 11, 2026
5077c8f
jooby: fix csrf, cookie, and ssi handling
xsalefter Apr 11, 2026
1ac0cb4
build: ignore .codex workspace
xsalefter Apr 11, 2026
ea3f900
commons: migrate to jakarta.inject
xsalefter Apr 11, 2026
8d9de17
commons: migrate remaining Jakarta namespaces
xsalefter Apr 11, 2026
142d960
build: centralize Jakarta version properties
xsalefter Apr 11, 2026
a4c823e
build: adopt the JDK 21 baseline, fix spotbugs, fix broken tests
xsalefter Apr 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
ci:
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@main
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@java21
with:
test-profile-matrix: '[ "travis", "mysql", "postgresql", "jdbi", "config-magic" ]'
2 changes: 1 addition & 1 deletion .github/workflows/cloudsmith_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
cloudsmith_release:
uses: killbill/gh-actions-shared/.github/workflows/cloudsmith_release.yml@main
uses: killbill/gh-actions-shared/.github/workflows/cloudsmith_release.yml@java21
with:
group_id: org.kill-bill.commons
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ on:

jobs:
analyze:
uses: killbill/gh-actions-shared/.github/workflows/codeql-analysis.yml@main
uses: killbill/gh-actions-shared/.github/workflows/codeql-analysis.yml@java21
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
steps:
- name: Checkout code
if: github.event.inputs.perform_version == ''
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Checkout full repository
# Required when performing an existing release.
if: github.event.inputs.perform_version != ''
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup git user
Expand All @@ -43,9 +43,10 @@ jobs:
git config --global user.name "Kill Bill core team"
git config --global url."https://${BUILD_USER}:${BUILD_TOKEN}@github.com/".insteadOf "git@github.com:"
- name: Configure Java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: temurin
- name: Download Java dependencies
# We do as much as we can, but it may not be enough (https://issues.apache.org/jira/browse/MDEP-82)
run: |
Expand All @@ -64,9 +65,9 @@ jobs:
# Will be pushed as part of the release process, only if the release is successful
git commit -m "pom.xml: update killbill-oss-parent to ${{ github.event.inputs.parent_version }}"
- name: Configure settings.xml for release
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: temurin
server-id: central
server-username: MAVEN_USERNAME
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
snapshot:
uses: killbill/gh-actions-shared/.github/workflows/snapshot.yml@main
uses: killbill/gh-actions-shared/.github/workflows/snapshot.yml@java21
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
sync:
uses: killbill/gh-actions-shared/.github/workflows/sync.yml@main
uses: killbill/gh-actions-shared/.github/workflows/sync.yml@java21
secrets:
CREATE_PULL_REQUEST_SSH_KEY: ${{ secrets.CREATE_PULL_REQUEST_SSH_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ Temporary Items
*.tmproj
*.tmproject
tmtags
/.codex
2 changes: 2 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion automaton/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-commons</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-automaton</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlIDREF;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlIDREF;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlID;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlID;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import java.util.NoSuchElementException;
import java.util.stream.Stream;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlID;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper;
import jakarta.xml.bind.annotation.XmlID;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
import java.util.NoSuchElementException;
import java.util.stream.Stream;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper;
import jakarta.xml.bind.annotation.XmlRootElement;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlIDREF;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlIDREF;

import org.killbill.xmlloader.ValidationErrors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import org.killbill.xmlloader.ValidatingConfig;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;

@XmlAccessorType(XmlAccessType.NONE)
public abstract class StateMachineValidatingConfig<Context> extends ValidatingConfig<Context> {
Expand Down
2 changes: 1 addition & 1 deletion clock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-commons</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-clock</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion concurrent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-commons</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-concurrent</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
@Test(singleThreaded = true)
public class TestExecutors {

// JDK 21 changed Thread.toString() to include the numeric thread id and extra metadata.
// These tests only care that the executor thread name is present, not the JVM-specific prefix.
private static final String TEST_EXECUTOR_THREAD_PATTERN = "Thread\\[[^\\]]*TestLoggingExecutor-[^\\]]+\\]";

private void registerAppenders(final Logger loggingLogger, final Logger failsafeLogger, final WriterAppender dummyAppender) {
dummyAppender.setImmediateFlush(true);
loggingLogger.setLevel(Level.DEBUG);
Expand Down Expand Up @@ -103,8 +107,10 @@ public void run() {

final String actual = bos.toString();

assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.RuntimeException: Fail!\r?\n"));
assertPattern(actual, Pattern.compile("DEBUG - Thread\\[TestLoggingExecutor-[^\\]]+\\] finished executing$"));
// Match the log severity/message/exception content while tolerating both pre-JDK-21 and
// JDK-21+ thread string formats.
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.RuntimeException: Fail!"));
assertPattern(actual, finishedExecutingPattern());
}

private void errorTest(final ExecutorService executorService) throws Exception {
Expand All @@ -124,8 +130,10 @@ public void run() {

final String actual = bos.toString();

assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.OutOfMemoryError: Poof!\r?\n"));
assertPattern(actual, Pattern.compile("DEBUG - Thread\\[TestLoggingExecutor-[^\\]]+\\] finished executing$"));
// Keep this assertion focused on the wrapped error logging rather than the exact
// Thread.toString() rendering chosen by the current JDK.
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.OutOfMemoryError: Poof!"));
assertPattern(actual, finishedExecutingPattern());
}

private void callableTest(final ExecutorService executorService) throws Exception {
Expand Down Expand Up @@ -168,9 +176,11 @@ public Void call() throws Exception {

final String actual = bos.toString();

assertPattern(actual, Pattern.compile("DEBUG - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended with an exception\r?\njava.lang.Exception: Oops!\r?\n"));
assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended with an exception\r?\njava.lang.OutOfMemoryError: Uh oh!\r?\n"));
assertPattern(actual, Pattern.compile("DEBUG - Thread\\[TestLoggingExecutor-[^\\]]+\\] finished executing$"));
// Callable logging uses DEBUG for checked exceptions and ERROR for Errors; the helper keeps
// that semantic assertion stable across JDK thread formatting changes.
assertPattern(actual, exceptionLogPattern("DEBUG", "ended with an exception", "java.lang.Exception: Oops!"));
assertPattern(actual, exceptionLogPattern("ERROR", "ended with an exception", "java.lang.OutOfMemoryError: Uh oh!"));
assertPattern(actual, finishedExecutingPattern());
}

private void scheduledTest(final ScheduledExecutorService executorService) throws Exception {
Expand Down Expand Up @@ -239,12 +249,26 @@ public void run() {

final String actual = bos.toString();

assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.RuntimeException: D'oh!\r?\n"));
assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.OutOfMemoryError: Zoinks!\r?\n"));
assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.RuntimeException: Eep!\r?\n"));
assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.OutOfMemoryError: Zounds!\r?\n"));
assertPattern(actual, Pattern.compile("ERROR - Thread\\[TestLoggingExecutor-[^\\]]+\\] ended abnormally with an exception\r?\njava.lang.RuntimeException: Egad!\r?\n"));
assertPattern(actual, Pattern.compile("DEBUG - Thread\\[TestLoggingExecutor-[^\\]]+\\] finished executing$"));
// Scheduled executors emit several wrapped failures; use the shared helper so each
// assertion still verifies the exact throwable/message without depending on thread ids.
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.RuntimeException: D'oh!"));
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.OutOfMemoryError: Zoinks!"));
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.RuntimeException: Eep!"));
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.OutOfMemoryError: Zounds!"));
assertPattern(actual, exceptionLogPattern("ERROR", "ended abnormally with an exception", "java.lang.RuntimeException: Egad!"));
assertPattern(actual, finishedExecutingPattern());
}

// Build the regex from the stable log semantics and allow either legacy or JDK 21+ thread
// renderings; \R keeps the assertion platform-neutral for line endings too.
private Pattern exceptionLogPattern(final String level, final String message, final String throwable) {
return Pattern.compile(Pattern.quote(level + " - ") + TEST_EXECUTOR_THREAD_PATTERN + Pattern.quote(" " + message) + "\\R" + Pattern.quote(throwable) + "\\R");
}

// Same rationale as exceptionLogPattern: verify the message, but ignore JVM-specific thread
// formatting details that changed in Java 21.
private Pattern finishedExecutingPattern() {
return Pattern.compile(Pattern.quote("DEBUG - ") + TEST_EXECUTOR_THREAD_PATTERN + Pattern.quote(" finished executing") + "$");
}

private void assertPattern(final String actual, final Pattern expected) {
Expand Down
4 changes: 2 additions & 2 deletions config-magic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-commons</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-config-magic</artifactId>
Expand Down Expand Up @@ -66,7 +66,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Don't run JUnit tests -->
<groups />
<groups/>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class DataAmount {
public final class DataAmount {

private static final Pattern SPLIT = Pattern.compile("^(\\d+)\\s*([a-zA-Z]+)$");
private static final Pattern NUM_ONLY = Pattern.compile("^(\\d+)$");
Expand Down
2 changes: 1 addition & 1 deletion config-magic/src/main/java/org/skife/config/TimeSpan.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TimeSpan {
public final class TimeSpan {

private static final Pattern SPLIT = Pattern.compile("^(\\d+)\\s?(\\w+)$");
private static final HashMap<String, TimeUnit> UNITS = new HashMap<String, TimeUnit>();
Expand Down
2 changes: 1 addition & 1 deletion embeddeddb/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-embeddeddb</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-embeddeddb-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion embeddeddb/h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-embeddeddb</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-embeddeddb-h2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion embeddeddb/mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-embeddeddb</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-embeddeddb-mysql</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion embeddeddb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-commons</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-embeddeddb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion embeddeddb/postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-embeddeddb</artifactId>
<version>0.26.14-SNAPSHOT</version>
<version>0.27.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-embeddeddb-postgresql</artifactId>
Expand Down
Loading
Loading