Avoid NPE
This commit is contained in:
parent
c1ef7eda9e
commit
ad2131491b
@ -252,6 +252,7 @@ public class MoneyMixinVault extends MoneyMixinAbstract
|
|||||||
|
|
||||||
public static Object getEconomyObject(String accountId)
|
public static Object getEconomyObject(String accountId)
|
||||||
{
|
{
|
||||||
|
if (null == accountId) return null;
|
||||||
// Because of Factions we have this crazy-workaround.
|
// Because of Factions we have this crazy-workaround.
|
||||||
// Where offlineplayers will be used when possible
|
// Where offlineplayers will be used when possible
|
||||||
// but otherwise names will.
|
// but otherwise names will.
|
||||||
|
@ -70,7 +70,6 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
|||||||
@Override
|
@Override
|
||||||
public String fixId(Object oid)
|
public String fixId(Object oid)
|
||||||
{
|
{
|
||||||
// A null oid should always return null.
|
|
||||||
if (oid == null) throw new NullPointerException("oid");
|
if (oid == null) throw new NullPointerException("oid");
|
||||||
|
|
||||||
String ret = null;
|
String ret = null;
|
||||||
@ -87,8 +86,10 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
|||||||
if (ret == null)
|
if (ret == null)
|
||||||
{
|
{
|
||||||
// Always lower case.
|
// Always lower case.
|
||||||
return IdUtil.getId(oid);
|
ret = IdUtil.getId(oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ret == null) throw new NullPointerException("Could not fix: " + oid);
|
||||||
|
|
||||||
if (this.isLowercasing())
|
if (this.isLowercasing())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user