Skip to content

Commit e499c77

Browse files
author
jantje
committed
#1174 using hasSet instead of ArrayList
1 parent 779060e commit e499c77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

io.sloeber.ui/src/io/sloeber/ui/listeners/ProjectExplorerListener.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* on
66
*/
77

8-
import java.util.ArrayList;
9-
import java.util.List;
8+
import java.util.HashSet;
9+
import java.util.Set;
1010

1111
import org.eclipse.core.resources.IProject;
1212
import org.eclipse.core.resources.IResource;
@@ -70,7 +70,7 @@ public void selectionChanged(IWorkbenchPart part, ISelection newSelection) {
7070
if (!newSelection.isEmpty()) {
7171
if (newSelection instanceof IStructuredSelection) {
7272

73-
List<IProject> allSelectedprojects = new ArrayList<>();
73+
Set<IProject> allSelectedprojects = new HashSet<>();
7474
for (Object element : ((IStructuredSelection) newSelection).toList()) {
7575
if (element instanceof IAdaptable) {
7676
@SuppressWarnings("cast") // this is needed for the

0 commit comments

Comments
 (0)