Skip to content

Commit 6a47e85

Browse files
committed
Run CI/test on Java 8/11/17/21 versions
Makes minor visibility changes to ensure they can be run on Java 17+ as well without using reflection hacks.
1 parent 360380d commit 6a47e85

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

.github/workflows/maven.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ on:
1616

1717
jobs:
1818
build:
19-
19+
name: Java ${{ matrix.java_version }}
2020
runs-on: ubuntu-latest
2121

22+
strategy:
23+
matrix:
24+
java_version: [ '8', '11', '17', '21' ]
25+
fail-fast: false
26+
2227
steps:
2328
- uses: actions/checkout@v4
24-
- name: Set up JDK 8
29+
- name: Set up JDK
2530
uses: actions/setup-java@v4
2631
with:
27-
java-version: '8'
32+
java-version: ${{ matrix.java_version }}
2833
distribution: 'temurin'
2934
cache: maven
3035
- name: Build with Maven

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@
145145
<version>3.0.3</version>
146146
<scope>test</scope>
147147
</dependency>
148+
<dependency>
149+
<groupId>jakarta.activation</groupId>
150+
<artifactId>jakarta.activation-api</artifactId>
151+
<version>1.2.2</version>
152+
<scope>test</scope>
153+
</dependency>
148154
</dependencies>
149155

150156
<build>

src/main/java/org/jruby/rack/DefaultRackApplicationFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ protected void loadJRubyRack(final Ruby runtime) {
352352
/**
353353
* Initializes the runtime (exports the context, boots the Rack handler).
354354
*
355-
* NOTE: (package) visible due specs
355+
* NOTE: visible due to specs
356356
*
357357
* @param runtime
358358
*/
359-
void initRuntime(final Ruby runtime) {
359+
public void initRuntime(final Ruby runtime) {
360360
loadJRubyRack(runtime);
361361
// set $servlet_context :
362362
runtime.getGlobalVariables().set(
@@ -406,7 +406,7 @@ void initRuntime(final Ruby runtime) {
406406
* @param runtime
407407
* @return the rack version requirement
408408
*/
409-
String checkAndSetRackVersion(final Ruby runtime) {
409+
public String checkAndSetRackVersion(final Ruby runtime) {
410410
String rackVersion = null;
411411
try {
412412
rackVersion = IOHelpers.rubyMagicCommentValue(rackupScript, "rack.version:");

src/main/java/org/jruby/rack/embed/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public String getProperty(String key, String defaultValue) {
8181
} */
8282

8383
@SuppressWarnings("unchecked")
84-
void doInitialize(final Ruby runtime) {
84+
public void doInitialize(final Ruby runtime) {
8585
setOut( runtime.getOut() );
8686
setErr( runtime.getErr() );
8787
rubyENV = runtime.getENV();

0 commit comments

Comments
 (0)