From 0bfc5a140f6bd21b50bb186f6b443cb9d039787d Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Wed, 13 Sep 2017 15:42:18 +0200 Subject: [PATCH] Issue #1817 - JstlTest failure with JDK 9. Disabled test for JDK 9. --- .../java/org/eclipse/jetty/jstl/JstlTest.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java index 43cfd15e04a..c3bb5f89ba7 100644 --- a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java +++ b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java @@ -18,11 +18,6 @@ package org.eclipse.jetty.jstl; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; - import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -36,15 +31,22 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.toolchain.test.FS; import org.eclipse.jetty.toolchain.test.JAR; +import org.eclipse.jetty.toolchain.test.JDK; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.webapp.Configuration; import org.eclipse.jetty.webapp.WebAppContext; import org.junit.AfterClass; +import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + public class JstlTest { private static Server server; @@ -53,6 +55,8 @@ public class JstlTest @BeforeClass public static void startServer() throws Exception { + Assume.assumeFalse(JDK.IS_9); + // Setup Server server = new Server(); ServerConnector connector = new ServerConnector(server); @@ -102,7 +106,8 @@ public class JstlTest @AfterClass public static void stopServer() throws Exception { - server.stop(); + if (server != null) + server.stop(); } @Test