diff --git a/spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java index b0363234d619..a3679ef66627 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java @@ -36,7 +36,7 @@ * @author Juergen Hoeller * @since 4.2 */ -@DisabledForJreRange(min = JAVA_15) +@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15 public class StandardScriptFactoryTests { @Test diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java index 126e1c2f94c1..3e6ce64a3f10 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -36,12 +37,14 @@ import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.condition.JRE.JAVA_15; /** * Unit tests for pure JavaScript templates running on Nashorn engine. * * @author Sebastien Deleuze */ +@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15 public class NashornScriptTemplateTests { @Test diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java index 9632f916a2a2..6648d729432c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.beans.DirectFieldAccessor; import org.springframework.context.ApplicationContextException; @@ -37,6 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; +import static org.junit.jupiter.api.condition.JRE.JAVA_15; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; @@ -45,6 +47,7 @@ * * @author Sebastien Deleuze */ +@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15 public class ScriptTemplateViewTests { private ScriptTemplateView view; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/NashornScriptTemplateTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/NashornScriptTemplateTests.java index 95173e801652..72f56d47a902 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/NashornScriptTemplateTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/NashornScriptTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -33,13 +34,15 @@ import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.condition.JRE.JAVA_15; import static org.mockito.Mockito.mock; /** - * Unit tests for pure Javascript templates running on Nashorn engine. + * Unit tests for pure JavaScript templates running on Nashorn engine. * * @author Sebastien Deleuze */ +@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15 public class NashornScriptTemplateTests { private WebApplicationContext webAppContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java index 26251e48bf1b..848dc219f118 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.beans.DirectFieldAccessor; import org.springframework.context.ApplicationContextException; @@ -46,6 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; +import static org.junit.jupiter.api.condition.JRE.JAVA_15; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; @@ -55,6 +57,7 @@ * * @author Sebastien Deleuze */ +@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15 public class ScriptTemplateViewTests { private ScriptTemplateView view;