Skip to content

Commit 4060d29

Browse files
committed
Fix ErrorShouldRethrowTest
1 parent 8f2adbc commit 4060d29

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ErrorShouldRethrowTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2024 DiffPlug
2+
* Copyright 2016-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,13 +15,16 @@
1515
*/
1616
package com.diffplug.gradle.spotless;
1717

18+
import static org.junit.jupiter.api.condition.JRE.JAVA_23;
19+
1820
import java.io.IOException;
1921
import java.util.ArrayList;
2022
import java.util.Arrays;
2123
import java.util.List;
2224

2325
import org.gradle.testkit.runner.BuildResult;
2426
import org.junit.jupiter.api.Test;
27+
import org.junit.jupiter.api.condition.EnabledForJreRange;
2528

2629
import com.diffplug.selfie.Selfie;
2730
import com.diffplug.selfie.StringSelfie;
@@ -57,6 +60,7 @@ void passesIfNoException() throws Exception {
5760
}
5861

5962
@Test
63+
@EnabledForJreRange(max = JAVA_23) // `[Incubating] Problems report is available at` presents in the output from Java 24 or above.
6064
void anyExceptionShouldFail() throws Exception {
6165
writeBuild(
6266
" } // format",
@@ -105,6 +109,7 @@ void unlessExemptedByPath() throws Exception {
105109
}
106110

107111
@Test
112+
@EnabledForJreRange(max = JAVA_23) // `[Incubating] Problems report is available at` presents in the output from Java 24 or above.
108113
void failsIfNeitherStepNorFileExempted() throws Exception {
109114
writeBuild(
110115
" ignoreErrorForStep 'nope'",

0 commit comments

Comments
 (0)