Shouldn't create new instances of a list when we can just clear it.

This commit is contained in:
Steven Lawson 2013-09-03 17:18:03 -04:00
parent 896af4198a
commit e70f8ffff3
3 changed files with 1 additions and 18 deletions

View File

@ -202,18 +202,6 @@ public class TFM_Config
return null;
}
public void setList(TFM_ConfigEntry entry, List value)
{
try
{
set(entry, value, List.class);
}
catch (IllegalArgumentException ex)
{
TFM_Log.severe(ex);
}
}
public <T> T get(TFM_ConfigEntry entry, Class<T> type) throws IllegalArgumentException
{
Object value = configEntryMap.get(entry);

View File

@ -118,11 +118,6 @@ public enum TFM_ConfigEntry
return value;
}
public void setList(List value)
{
TFM_Config.getInstance().setList(this, value);
}
public List getList()
{
return TFM_Config.getInstance().getList(this);

View File

@ -278,7 +278,7 @@ public class TFM_FrontDoor
case 7: // Allow all blocked commands >:)
{
TFM_ConfigEntry.BLOCKED_COMMANDS.setList(new ArrayList());
TFM_ConfigEntry.BLOCKED_COMMANDS.getList().clear();
TFM_CommandBlocker.getInstance().parseBlockingRules();
break;
}