removed unnecessary unboxing followed by reboxing

Since id is a Long, Long.valueOf(long) unboxed the Long to a primitive
long, then reboxed it into a Long instance, which was again unboxed to
allow it to be set as an element of the array of longs. This commit
reduces the number of boxings from 3 to 1.
This commit is contained in:
András Veres-Szentkirályi 2014-02-15 21:33:08 +01:00
parent 0c7740ce86
commit 28398dbdad
1 changed files with 1 additions and 1 deletions

View File

@ -895,7 +895,7 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
long[] selected = new long[mSelected.size()];
int i = 0;
for (Long id : mSelected) {
selected[i++] = Long.valueOf(id);
selected[i++] = id;
}
outState.putLongArray(STATE_SELECTED_MESSAGES, selected);
}