Skip to content

Commit d7563b9

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 f629be5 commit d7563b9

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/maven.yml

Lines changed: 9 additions & 4 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
@@ -33,4 +38,4 @@ jobs:
3338
# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3439
- name: Update dependency graph
3540
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
36-
if: github.head_ref == 'refs/heads/master'
41+
if: github.head_ref == 'refs/heads/master' && matrix.java_version == '8'

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)