[WW-4981] Adds support for JDK11 (#270)

* Upgrades test dependencies

* Drops unused lib

* Uses AssertJ instead of FestAssert

* Upgrades Surefire Maven Plugin to 2.22.1

* Downgrades to AssertJ 2.x to support JDK7

* decouple tests from java version

Refactor a java 9 conditional test to work always with any java version

See also WW-4845

* fix NullPointerException in NotURLClassLoader tests

Also includes a few improvements

See also WW-4845

* do not specify threadCount & forkMode which breaks tests in java 9

See also WW-4845

* pass all current tests with java 11

See also WW-4981

* fix an odd path problem in java 9

See also WW-4845

* gitignore test-output

See also WW-4981

* ask travis an oracle jdk 11 build

See also WW-4981

* ask travis to report coverage only in latest working jdk, jdk8

See also WW-4845
This commit is contained in:
Lukasz Lenart
2018-11-19 08:05:01 +01:00
committed by Yasser Zamani
parent f2ad93a0d6
commit 2a60c1eee6
19 changed files with 243 additions and 220 deletions
@@ -231,12 +231,14 @@ public class EmbeddedJSPResultTest extends TestCase {
NotURLClassLoader loader = new NotURLClassLoader(parentClassLoader);
Thread.currentThread().setContextClassLoader(loader);
result.setLocation("org/apache/struts2/tag0.jsp");
result.execute(null);
try {
result.setLocation("org/apache/struts2/tag0.jsp");
result.execute(null);
assertEquals("Thissessionisnotsecure.OtherText", StringUtils.deleteWhitespace(response.getContentAsString()));
Thread.currentThread().setContextClassLoader(parentClassLoader);
assertEquals("Thissessionisnotsecure.OtherText", StringUtils.deleteWhitespace(response.getContentAsString()));
} finally {
Thread.currentThread().setContextClassLoader(parentClassLoader);
}
}
@Override