Skip to content

Commit 7101ab8

Browse files
eclipse-equinox-botlaeubi
authored andcommitted
Perform clean code of bundles/org.eclipse.equinox.p2.ui
1 parent 6d81ff0 commit 7101ab8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public MetadataRepositoryElementComparator(int sortKey) {
3636

3737
@Override
3838
public int compare(Viewer viewer, Object obj1, Object obj2) {
39-
MetadataRepositoryElement repo1 = obj1 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj1 : null;
40-
MetadataRepositoryElement repo2 = obj2 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj2 : null;
39+
MetadataRepositoryElement repo1 = obj1 instanceof MetadataRepositoryElement m ? m : null;
40+
MetadataRepositoryElement repo2 = obj2 instanceof MetadataRepositoryElement m ? m : null;
4141
if (repo1 == null || repo2 == null) {
4242
// If these are not both metadata repository elements, use the super class comparator.
4343
return super.compare(viewer, obj1, obj2);

0 commit comments

Comments
 (0)