From a91f377cf5e30a6b6cda0b69d11fc76454da569e Mon Sep 17 00:00:00 2001 From: benwoo1110 <30431861+benwoo1110@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:40:21 +0800 Subject: [PATCH 1/2] Fix compile on java 11. --- pom.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ec4a65c1..365d619b 100644 --- a/pom.xml +++ b/pom.xml @@ -215,7 +215,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.1.1 + 3.2.4 package @@ -264,13 +264,19 @@ se.eris notnull-instrumenter-maven-plugin - 0.6.8 + 1.0.0 instrument tests-instrument + + + org.jetbrains.annotations.NotNull + javax.validation.constraints.NotNull + + From 5350c012f7e611656ef6ad04f4ea864640844b2e Mon Sep 17 00:00:00 2001 From: Kermina Awad Date: Thu, 25 Feb 2021 17:48:17 -0500 Subject: [PATCH 2/2] fix compiling on java 15 --- pom.xml | 6 +++--- .../MultiverseCore/utils/TestInstanceCreator.java | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 365d619b..d8d98f85 100644 --- a/pom.xml +++ b/pom.xml @@ -359,21 +359,21 @@ org.powermock powermock-module-junit4 - 2.0.0 + 2.0.9 jar test org.powermock powermock-api-easymock - 2.0.0 + 2.0.9 jar test org.powermock powermock-api-mockito2 - 2.0.0 + 2.0.9 jar test diff --git a/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java b/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java index 9a29f93e..a0343c38 100644 --- a/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java +++ b/src/test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java @@ -214,11 +214,18 @@ public class TestInstanceCreator { serverfield.set(core, mockServer); // Set buscript - Buscript buscript = PowerMockito.spy(new Buscript(core)); + Buscript buscript; Field buscriptfield = MultiverseCore.class.getDeclaredField("buscript"); buscriptfield.setAccessible(true); + + try { + buscript = PowerMockito.spy(new Buscript(core)); + when(buscript.getPlugin()).thenReturn(core); + } catch (NullPointerException e) { + buscript = null; + } + buscriptfield.set(core, buscript); - when(buscript.getPlugin()).thenReturn(core); // Set worldManager WorldManager wm = PowerMockito.spy(new WorldManager(core));