Avoid creating tempList when not needed.
This commit is contained in:
@@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
|
|||||||
|
|
||||||
public List<ItemHistoryTransaction> getHistory(boolean full)
|
public List<ItemHistoryTransaction> getHistory(boolean full)
|
||||||
{
|
{
|
||||||
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
|
||||||
if (!full)
|
if (!full)
|
||||||
{
|
{
|
||||||
|
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
||||||
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
||||||
for (ItemHistoryTransaction transaction : tempList)
|
for (ItemHistoryTransaction transaction : tempList)
|
||||||
{
|
{
|
||||||
|
@@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
|
|||||||
|
|
||||||
public List<ItemHistoryTransaction> getHistory(boolean full)
|
public List<ItemHistoryTransaction> getHistory(boolean full)
|
||||||
{
|
{
|
||||||
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
|
||||||
if (!full)
|
if (!full)
|
||||||
{
|
{
|
||||||
|
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
||||||
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
||||||
for (ItemHistoryTransaction transaction : tempList)
|
for (ItemHistoryTransaction transaction : tempList)
|
||||||
{
|
{
|
||||||
|
@@ -105,9 +105,9 @@ public class PrivateStoreHistoryManager
|
|||||||
|
|
||||||
public List<ItemHistoryTransaction> getHistory(boolean full)
|
public List<ItemHistoryTransaction> getHistory(boolean full)
|
||||||
{
|
{
|
||||||
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
|
||||||
if (!full)
|
if (!full)
|
||||||
{
|
{
|
||||||
|
final List<ItemHistoryTransaction> tempList = new ArrayList<>(_items);
|
||||||
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
final Map<Integer, Integer> uniqueItemIds = new HashMap<>();
|
||||||
for (ItemHistoryTransaction transaction : tempList)
|
for (ItemHistoryTransaction transaction : tempList)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user