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