mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 14:45:47 +03:00
spotbugs: remove primitive boxing
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
c2a6e587e8
commit
d42b86c0eb
1 changed files with 4 additions and 8 deletions
|
@ -47,11 +47,9 @@ public class FileSortOrderBySize extends FileSortOrder {
|
|||
|
||||
Collections.sort(files, (o1, o2) -> {
|
||||
if (o1.isFolder() && o2.isFolder()) {
|
||||
Long obj1 = o1.getFileLength();
|
||||
return multiplier * obj1.compareTo(o2.getFileLength());
|
||||
return multiplier * Long.compare(o1.getFileLength(), o2.getFileLength());
|
||||
} else if (o1.isFolder()) {
|
||||
return -1;
|
||||
|
||||
} else if (o2.isFolder()) {
|
||||
return 1;
|
||||
} else {
|
||||
|
@ -73,8 +71,7 @@ public class FileSortOrderBySize extends FileSortOrder {
|
|||
|
||||
Collections.sort(files, (o1, o2) -> {
|
||||
if (o1.isFolder() && o2.isFolder()) {
|
||||
Long obj1 = o1.getFileLength();
|
||||
return multiplier * obj1.compareTo(o2.getFileLength());
|
||||
return multiplier * Long.compare(o1.getFileLength(), o2.getFileLength());
|
||||
} else if (o1.isFolder()) {
|
||||
return -1;
|
||||
|
||||
|
@ -99,8 +96,8 @@ public class FileSortOrderBySize extends FileSortOrder {
|
|||
|
||||
Collections.sort(files, (o1, o2) -> {
|
||||
if (o1.isDirectory() && o2.isDirectory()) {
|
||||
Long obj1 = FileStorageUtils.getFolderSize(o1);
|
||||
return multiplier * obj1.compareTo(FileStorageUtils.getFolderSize(o2));
|
||||
return multiplier * Long.compare(FileStorageUtils.getFolderSize(o1),
|
||||
FileStorageUtils.getFolderSize(o2));
|
||||
} else if (o1.isDirectory()) {
|
||||
return -1;
|
||||
} else if (o2.isDirectory()) {
|
||||
|
@ -112,5 +109,4 @@ public class FileSortOrderBySize extends FileSortOrder {
|
|||
|
||||
return files;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue