Skip to content

Commit 59ae2ba

Browse files
committed
CI: start testing on JDK 25
- bump upper bound from JDK 24 to 25 ea - switch to temurin due to EA build availability (fails below b22) - '--enable-preview' can be removed from a build script since "compact source files" are going final (JEP 512) - java hints job stays on JDK 24 until new nb-javac is integrated - EvaluatorTest: updated test data since java.lang.Runtime is now final
1 parent 69adafd commit 59ae2ba

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed

.github/scripts/CommitHeaderChecker.java

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ record Result(int total, boolean green) {}
3636
// checks commit headers for valid author, email and commit msg formatting
3737
// its main purpose is to prevent common merge mistakes
3838

39-
// Java 23+, may require preview flag
39+
// Java 25+
4040
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/${{ github.event.pull_request.number }}
4141

4242
// green tests:
43-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/66
44-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/7641
45-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/4138
46-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/4692
43+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/66
44+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/7641
45+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/4138
46+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/4692
4747

4848
// red tests:
49-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/7776
50-
// java --enable-preview CommitHeaderChecker.java https://github.com/apache/netbeans/pull/5567
49+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/7776
50+
// java CommitHeaderChecker.java https://github.com/apache/netbeans/pull/5567
5151

5252
void main(String[] args) throws IOException, InterruptedException {
5353

@@ -60,7 +60,7 @@ void main(String[] args) throws IOException, InterruptedException {
6060
.timeout(Duration.ofSeconds(10))
6161
.build();
6262

63-
println("checking PR patch file...");
63+
log("checking PR patch file...");
6464
Result result;
6565
try (HttpClient client = HttpClient.newBuilder()
6666
.followRedirects(Redirect.NORMAL).build()) {
@@ -81,7 +81,7 @@ void main(String[] args) throws IOException, InterruptedException {
8181
.orElseThrow();
8282
}
8383

84-
println(result.total + " commit(s) checked");
84+
log(result.total + " commit(s) checked");
8585
System.exit(result.green ? 0 : 1);
8686
}
8787

@@ -124,7 +124,7 @@ boolean checkNameAndEmail(int i, String from) {
124124

125125
boolean green = true;
126126
if (mail.isBlank() || !mail.contains("@") || mail.contains("noreply") || mail.contains("localhost")) {
127-
println("::error::invalid email in commit " + i + " '" + from + "'");
127+
log("::error::invalid email in commit " + i + " '" + from + "'");
128128
green = false;
129129
}
130130

@@ -133,7 +133,7 @@ boolean checkNameAndEmail(int i, String from) {
133133

134134
// single word author -> probably the nickname/account name/root etc
135135
if (author.isBlank() || (!encoded && !author.contains(" ") && !author.contains("-"))) {
136-
println("::error::invalid author in commit " + i + " '" + author + "' (full name?)");
136+
log("::error::invalid author in commit " + i + " '" + author + "' (full name?)");
137137
green = false;
138138
}
139139
return green;
@@ -145,7 +145,7 @@ boolean checkSubject(int i, String subject) {
145145
subject = subject.substring(subject.indexOf(']')+1).strip();
146146
// single word subjects are likely not intended or should be squashed before merge
147147
if (!subject.contains(" ")) {
148-
println("::error::invalid subject in commit " + i + " '" + subject + "'");
148+
log("::error::invalid subject in commit " + i + " '" + subject + "'");
149149
return false;
150150
}
151151
return true;
@@ -155,8 +155,12 @@ boolean checkSubject(int i, String subject) {
155155
boolean checkBlankLineAfterSubject(int i, String blank) {
156156
// disabled since this would produce too many warnings due to overflowing subject lines
157157
// if (!blank.isBlank()) {
158-
// println("::warning::blank line after subject recommended in commit " + i + " (is subject over 50 char limit?)");
159-
//// return false;
158+
// log("::warning::blank line after subject recommended in commit " + i + " (is subject over 50 char limit?)");
159+
// // return false;
160160
// }
161161
return true;
162162
}
163+
164+
void log(String msg) {
165+
System.out.println(msg);
166+
}

.github/workflows/main.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,16 @@ env:
6060
# what to build and test, see nbbuild/cluster.properties
6161
CLUSTER_CONFIG: 'full'
6262

63-
# default java distribution used by the setup-java action
63+
# default java distribution used by the setup-java action across jobs
6464
# see https://github.com/actions/setup-java#supported-distributions
65-
DEFAULT_JAVA_DISTRIBUTION: 'zulu'
65+
# CI requirements:
66+
# - timely GA releases (no delays if possible)
67+
# - EA builds must be available for the upcoming release (note: some vendors skip builds)
68+
# - linux, win, mac (arm)
69+
# - reliable / no extra sauce
70+
DEFAULT_JAVA_DISTRIBUTION: 'temurin'
71+
# DEFAULT_JAVA_DISTRIBUTION: 'sapmachine'
72+
# DEFAULT_JAVA_DISTRIBUTION: 'zulu'
6673

6774
# labels are mapped to env vars for pipeline customization. If this is not a PR, (almost) everything will run, but with a reduced matrix.
6875
# note: env vars don't work in the job's 'if' field but do work within jobs ( https://github.com/actions/runner/issues/1189 ), the whole expression must be duplicated
@@ -133,7 +140,7 @@ jobs:
133140
timeout-minutes: 40
134141
strategy:
135142
matrix:
136-
java: [ '17', '21', '24' ]
143+
java: [ '17', '21', '25-ea' ]
137144
exclude:
138145
- java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
139146
fail-fast: false
@@ -238,7 +245,7 @@ jobs:
238245
java: [ 17 ]
239246
include:
240247
- os: ubuntu-latest
241-
java: 24
248+
java: 25-ea
242249
fail-fast: false
243250
steps:
244251

@@ -314,16 +321,16 @@ jobs:
314321
submodules: false
315322
show-progress: false
316323

317-
- name: Set up JDK 24 for scripts
324+
- name: Set up JDK 25 for scripts
318325
if: ${{ github.event_name == 'pull_request' && !cancelled() }}
319326
uses: actions/setup-java@v4
320327
with:
321-
java-version: 24
328+
java-version: 25-ea
322329
distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
323330

324331
- name: Check Commit Headers
325332
if: ${{ github.event_name == 'pull_request' && !cancelled() }}
326-
run: java --enable-preview .github/scripts/CommitHeaderChecker.java ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}
333+
run: java .github/scripts/CommitHeaderChecker.java ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}
327334

328335
- name: Set up JDK ${{ matrix.java }}
329336
if: ${{ !cancelled() }}
@@ -848,7 +855,7 @@ jobs:
848855
timeout-minutes: 50
849856
strategy:
850857
matrix:
851-
java: [ '17', '21', '24' ]
858+
java: [ '17', '21', '25-ea' ]
852859
exclude:
853860
- java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
854861
fail-fast: false
@@ -1455,6 +1462,7 @@ jobs:
14551462
timeout-minutes: 60
14561463
strategy:
14571464
matrix:
1465+
# TODO bump together with nb-javac 25 update
14581466
java: [ '17', '24' ]
14591467
config: [ 'batch1', 'batch2' ]
14601468
exclude:
@@ -1512,7 +1520,7 @@ jobs:
15121520
timeout-minutes: 60
15131521
strategy:
15141522
matrix:
1515-
java: [ '17', '21', '24' ]
1523+
java: [ '17', '21', '25-ea' ]
15161524
exclude:
15171525
- java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }}
15181526
fail-fast: false

java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/EvaluatorApp.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.Comparator;
2727
import java.util.HashMap;
2828
import java.util.Map;
29+
import java.util.Properties;
2930
import java.util.Vector;
3031

3132
/**
@@ -727,15 +728,15 @@ public static boolean testOp36b() {
727728
}
728729

729730
public static boolean testOp36c() {
730-
return (Runtime.getRuntime() instanceof java.lang.Iterable);
731+
return (System.getProperties() instanceof java.lang.AutoCloseable);
731732
}
732733

733734
public static boolean testOp36d() {
734-
return (Runtime.getRuntime() instanceof Runtime);
735+
return (System.getProperties() instanceof Properties);
735736
}
736737

737738
public static boolean testOp36e() {
738-
return (Runtime.getRuntime() instanceof Object);
739+
return (System.getProperties() instanceof Object);
739740
}
740741

741742
public static int testOp37a() {

0 commit comments

Comments
 (0)