From edea6807c6af86013540ff2ed853b9fa1c467850 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 6 Dec 2013 15:34:10 +0100 Subject: [PATCH] Handle null cases in the MoneyMixinAbstract --- src/com/massivecraft/mcore/money/MoneyMixinAbstract.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/mcore/money/MoneyMixinAbstract.java b/src/com/massivecraft/mcore/money/MoneyMixinAbstract.java index 66a77f72..d6e9c586 100644 --- a/src/com/massivecraft/mcore/money/MoneyMixinAbstract.java +++ b/src/com/massivecraft/mcore/money/MoneyMixinAbstract.java @@ -15,7 +15,7 @@ public abstract class MoneyMixinAbstract implements MoneyMixin public boolean move(String fromId, String toId, String byId, double amount, String category, String message) { - return this.move(fromId, toId, byId, amount, Arrays.asList(category), message); + return this.move(fromId, toId, byId, amount, (category == null ? null : Arrays.asList(category)), message); } public boolean move(String fromId, String toId, String byId, double amount, Collection categories) { @@ -23,7 +23,7 @@ public abstract class MoneyMixinAbstract implements MoneyMixin } public boolean move(String fromId, String toId, String byId, double amount, String category) { - return this.move(fromId, toId, byId, amount, Arrays.asList(category), null); + return this.move(fromId, toId, byId, amount, (category == null ? null : Arrays.asList(category)), null); } public boolean move(String fromId, String toId, String byId, double amount) {