From b3ac110dfe2d878c4d2973f63390be4d60b5a37d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 28 Jan 2018 14:21:45 +0200 Subject: [PATCH] Fixed maven shading --- Plan/dependency-reduced-pom.xml | 1 - Plan/pom.xml | 7 ------- .../com/djrapitops/plan/ShutdownHook.java | 2 ++ .../plan/data/container/PlayerKill.java | 10 ++++------ .../plan/data/container/Session.java | 18 ++++++++---------- .../djrapitops/plan/data/container/TPS.java | 19 ++++++++----------- .../djrapitops/plan/data/time/TimeKeeper.java | 8 ++------ .../plan/utilities/analysis/Point.java | 9 +++------ 8 files changed, 27 insertions(+), 47 deletions(-) diff --git a/Plan/dependency-reduced-pom.xml b/Plan/dependency-reduced-pom.xml index 3ce6703bc..c9091699d 100644 --- a/Plan/dependency-reduced-pom.xml +++ b/Plan/dependency-reduced-pom.xml @@ -47,7 +47,6 @@ - true org.powermock:* diff --git a/Plan/pom.xml b/Plan/pom.xml index 506fa900d..8ede53de8 100644 --- a/Plan/pom.xml +++ b/Plan/pom.xml @@ -26,14 +26,12 @@ com.djrapitops AbstractPluginFramework 3.0.1 - compile com.djrapitops PlanPluginBridge 4.2.0-SNAPSHOT - compile @@ -69,7 +67,6 @@ org.apache.commons commons-lang3 3.6 - compile @@ -82,19 +79,16 @@ org.apache.commons commons-dbcp2 2.1.1 - compile org.apache.commons commons-pool2 2.4.2 - compile commons-logging commons-logging 1.2 - compile @@ -171,7 +165,6 @@ - true org.powermock:* diff --git a/Plan/src/main/java/com/djrapitops/plan/ShutdownHook.java b/Plan/src/main/java/com/djrapitops/plan/ShutdownHook.java index 07954423e..f642e9664 100644 --- a/Plan/src/main/java/com/djrapitops/plan/ShutdownHook.java +++ b/Plan/src/main/java/com/djrapitops/plan/ShutdownHook.java @@ -53,6 +53,8 @@ public class ShutdownHook extends Thread { saveFirstSessionInformation(db, now); saveActiveSessions(db, activeSessions, now); + } catch (IllegalStateException ignored) { + /* Database is not initialized */ } catch (DBInitException e) { Log.toLog(this.getClass().getName(), e); } finally { diff --git a/Plan/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java b/Plan/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java index ffaf70766..1c8fb39eb 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/container/PlayerKill.java @@ -2,7 +2,6 @@ package com.djrapitops.plan.data.container; import com.djrapitops.plan.data.Actions; import com.djrapitops.plan.system.cache.DataCache; -import org.apache.commons.lang3.builder.ToStringBuilder; import java.util.Objects; import java.util.UUID; @@ -81,10 +80,9 @@ public class PlayerKill { @Override public String toString() { - return new ToStringBuilder(this) - .append("victim", victim) - .append("time", time) - .append("weapon", weapon) - .toString(); + return "PlayerKill{" + + "victim=" + victim + ", " + + "time=" + time + ", " + + "weapon='" + weapon + "'}"; } } diff --git a/Plan/src/main/java/com/djrapitops/plan/data/container/Session.java b/Plan/src/main/java/com/djrapitops/plan/data/container/Session.java index fb5a21349..22f4d0cd7 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/container/Session.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/container/Session.java @@ -2,7 +2,6 @@ package com.djrapitops.plan.data.container; import com.djrapitops.plan.data.time.WorldTimes; import com.djrapitops.plan.utilities.MiscUtils; -import org.apache.commons.lang3.builder.ToStringBuilder; import java.util.ArrayList; import java.util.HashMap; @@ -194,14 +193,13 @@ public class Session { @Override public String toString() { - return new ToStringBuilder(this) - .append("sessionStart", sessionStart) - .append("sessionID", sessionID) - .append("worldTimes", worldTimes) - .append("sessionEnd", sessionEnd) - .append("playerKills", playerKills) - .append("mobKills", mobKills) - .append("deaths", deaths) - .toString(); + return "Session{" + + "sessionStart=" + sessionStart + ", " + + "sessionID=" + sessionID + ", " + + "worldTimes=" + worldTimes + ", " + + "sessionEnd=" + sessionEnd + ", " + + "playerKills=" + playerKills + ", " + + "mobKills=" + mobKills + ", " + + "deaths=" + deaths + '}'; } } diff --git a/Plan/src/main/java/com/djrapitops/plan/data/container/TPS.java b/Plan/src/main/java/com/djrapitops/plan/data/container/TPS.java index c21137581..0b683ba99 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/container/TPS.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/container/TPS.java @@ -5,8 +5,6 @@ */ package com.djrapitops.plan.data.container; -import org.apache.commons.lang3.builder.ToStringBuilder; - import java.util.Objects; /** @@ -130,14 +128,13 @@ public class TPS { @Override public String toString() { - return new ToStringBuilder(this) - .append("date", date) - .append("ticksPerSecond", ticksPerSecond) - .append("players", players) - .append("cpuUsage", cpuUsage) - .append("usedMemory", usedMemory) - .append("entityCount", entityCount) - .append("chunksLoaded", chunksLoaded) - .toString(); + return "TPS{" + + "date=" + date + ", " + + "ticksPerSecond=" + ticksPerSecond + ", " + + "players=" + players + ", " + + "cpuUsage=" + cpuUsage + ", " + + "usedMemory=" + usedMemory + ", " + + "entityCount=" + entityCount + ", " + + "chunksLoaded=" + chunksLoaded + '}'; } } diff --git a/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java b/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java index 4b4645350..8fdd617e7 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java @@ -1,7 +1,6 @@ package com.djrapitops.plan.data.time; import com.djrapitops.plugin.utilities.Verify; -import org.apache.commons.lang3.builder.ToStringBuilder; import java.util.HashMap; import java.util.Map; @@ -155,10 +154,7 @@ public abstract class TimeKeeper { @Override public String toString() { - return new ToStringBuilder(this) - .append("times", times) - .append("state", state) - .append("lastStateChange", lastStateChange) - .toString(); + return "TimeKeeper{" + "times=" + times + + ", state='" + state + "', lastStateChange=" + lastStateChange + '}'; } } \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Point.java b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Point.java index cf74bf1fe..85dc2fe49 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Point.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Point.java @@ -1,7 +1,5 @@ package com.djrapitops.plan.utilities.analysis; -import org.apache.commons.lang3.builder.ToStringBuilder; - import java.util.Objects; /** @@ -41,9 +39,8 @@ public class Point { @Override public String toString() { - return new ToStringBuilder(this) - .append("x", x) - .append("y", y) - .toString(); + return "Point{" + + "x=" + x + ", " + + "y=" + y + '}'; } }