mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
PMD appeased
Some warnings have been supressed.
This commit is contained in:
parent
b4bcc3aadc
commit
2efc49c3d5
3 changed files with 22 additions and 4 deletions
|
@ -724,6 +724,23 @@ public class FileDataStorageManager {
|
||||||
Log_OC.e(TAG, e.getMessage(), e);
|
Log_OC.e(TAG, e.getMessage(), e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
} catch (IOException ex) {
|
||||||
|
ret = false;
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
|
try {
|
||||||
|
in.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log_OC.d(TAG, e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (out != null) {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log_OC.d(TAG, e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ContentProviderOperation> operations = new ArrayList<>(cursor.getCount());
|
ArrayList<ContentProviderOperation> operations = new ArrayList<>(cursor.getCount());
|
||||||
|
|
|
@ -313,4 +313,5 @@ public class ErrorMessageAdapter {
|
||||||
code == ResultCode.HOST_NOT_AVAILABLE;
|
code == ResultCode.HOST_NOT_AVAILABLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,7 +291,7 @@ public class FileStorageUtils {
|
||||||
List<File> files = new ArrayList<File>(Arrays.asList(filesArray));
|
List<File> files = new ArrayList<File>(Arrays.asList(filesArray));
|
||||||
|
|
||||||
Collections.sort(files, new Comparator<File>() {
|
Collections.sort(files, new Comparator<File>() {
|
||||||
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
|
@SuppressFBWarnings(value = "Bx")
|
||||||
public int compare(File o1, File o2) {
|
public int compare(File o1, File o2) {
|
||||||
Long obj1 = o1.lastModified();
|
Long obj1 = o1.lastModified();
|
||||||
return multiplier * obj1.compareTo(o2.lastModified());
|
return multiplier * obj1.compareTo(o2.lastModified());
|
||||||
|
@ -309,7 +309,7 @@ public class FileStorageUtils {
|
||||||
final int multiplier = mSortAscending ? 1 : -1;
|
final int multiplier = mSortAscending ? 1 : -1;
|
||||||
|
|
||||||
Collections.sort(files, new Comparator<OCFile>() {
|
Collections.sort(files, new Comparator<OCFile>() {
|
||||||
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
|
@SuppressFBWarnings(value = "Bx")
|
||||||
public int compare(OCFile o1, OCFile o2) {
|
public int compare(OCFile o1, OCFile o2) {
|
||||||
if (o1.isFolder() && o2.isFolder()) {
|
if (o1.isFolder() && o2.isFolder()) {
|
||||||
Long obj1 = o1.getFileLength();
|
Long obj1 = o1.getFileLength();
|
||||||
|
@ -338,7 +338,7 @@ public class FileStorageUtils {
|
||||||
List<File> files = new ArrayList<File>(Arrays.asList(filesArray));
|
List<File> files = new ArrayList<File>(Arrays.asList(filesArray));
|
||||||
|
|
||||||
Collections.sort(files, new Comparator<File>() {
|
Collections.sort(files, new Comparator<File>() {
|
||||||
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
|
@SuppressFBWarnings(value = "Bx")
|
||||||
public int compare(File o1, File o2) {
|
public int compare(File o1, File o2) {
|
||||||
if (o1.isDirectory() && o2.isDirectory()) {
|
if (o1.isDirectory() && o2.isDirectory()) {
|
||||||
Long obj1 = getFolderSize(o1);
|
Long obj1 = getFolderSize(o1);
|
||||||
|
@ -362,7 +362,7 @@ public class FileStorageUtils {
|
||||||
* Sorts list by Name
|
* Sorts list by Name
|
||||||
* @param files files to sort
|
* @param files files to sort
|
||||||
*/
|
*/
|
||||||
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
|
@SuppressFBWarnings(value = "Bx")
|
||||||
public static Vector<OCFile> sortOCFilesByName(Vector<OCFile> files){
|
public static Vector<OCFile> sortOCFilesByName(Vector<OCFile> files){
|
||||||
final int multiplier = mSortAscending ? 1 : -1;
|
final int multiplier = mSortAscending ? 1 : -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue