Avoid creating tempList when not needed.

This commit is contained in:
MobiusDevelopment 2023-01-09 00:31:48 +00:00
parent af8b9e14b8
commit 9a3d55e768
3 changed files with 3 additions and 3 deletions

View File

@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
public List<ItemHistoryTransaction> getHistory(boolean full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
if (!full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
for (ItemHistoryTransaction transaction : tempList)
{

View File

@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
public List<ItemHistoryTransaction> getHistory(boolean full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
if (!full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
for (ItemHistoryTransaction transaction : tempList)
{

View File

@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
public List<ItemHistoryTransaction> getHistory(boolean full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
if (!full)
{
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
for (ItemHistoryTransaction transaction : tempList)
{