File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed
src/test/java/org/junit/contrib/java/lang/system/internal Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ addons:
1919 packages :
2020 - openjdk-6-jdk
2121jdk :
22+ - openjdk10
2223 - oraclejdk9
2324 - oraclejdk8
2425 - openjdk7
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ System Rules supports [Travis CI](https://travis-ci.org/) (Linux) and
5454[ AppVeyor] ( http://www.appveyor.com/ ) (Windows) for continuous
5555integration. Your pull request will be automatically build by both CI
5656servers. On Travis CI we build your pull request with OpenJDK 6 and run test
57- with different JDKs (Java 6 to 9 ).
57+ with different JDKs (Java 6 to 10 ).
5858
5959
6060## Release Guide
Original file line number Diff line number Diff line change 99 </parent >
1010
1111 <artifactId >system-rules</artifactId >
12- <version >1.19.0 </version >
12+ <version >1.20.0-SNAPSHOT </version >
1313 <packaging >jar</packaging >
1414
1515 <name >System Rules</name >
Original file line number Diff line number Diff line change 33import static com .github .stefanbirkner .fishbowl .Fishbowl .exceptionThrownBy ;
44import static java .util .Arrays .asList ;
55import static org .assertj .core .api .Assertions .assertThat ;
6+ import static org .junit .Assume .assumeTrue ;
67import static org .mockito .Mockito .mock ;
78import static org .mockito .Mockito .mockingDetails ;
89import static org .mockito .Mockito .when ;
@@ -209,6 +210,8 @@ public static class with_original_SecurityManager {
209210
210211 @ Test
211212 public void getInCheck_is_delegated_to_original_security_manager () {
213+ //method "getInCheck" was removed in JDK 10
214+ skipOnJavaGreaterThan9 ();
212215 when (originalSecurityManager .getInCheck ()).thenReturn (true );
213216 assertThat (managerWithOriginal .getInCheck ()).isTrue ();
214217 }
@@ -233,6 +236,13 @@ public void thread_group_of_original_security_manager_is_provided() {
233236 when (originalSecurityManager .getThreadGroup ()).thenReturn (threadGroup );
234237 assertThat (managerWithOriginal .getThreadGroup ()).isSameAs (threadGroup );
235238 }
239+
240+ private void skipOnJavaGreaterThan9 () {
241+ String version = System .getProperty ("java.version" );
242+ assumeTrue (
243+ version .startsWith ("1." ) || version .equals ("9" )
244+ );
245+ }
236246 }
237247
238248 public static class without_original_SecurityManager {
You can’t perform that action at this time.
0 commit comments