From aa3d3c262cf752c4023f71b414c1209fb22edc7f Mon Sep 17 00:00:00 2001 From: AndyScherzinger Date: Thu, 3 Nov 2016 10:47:15 +0100 Subject: [PATCH] further findbugs/pmd fixes for new feature (sd card) --- .../datamodel/FileDataStorageManager.java | 20 +------------------ .../AbstractCommandLineStoragePoint.java | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/com/owncloud/android/datamodel/FileDataStorageManager.java b/src/com/owncloud/android/datamodel/FileDataStorageManager.java index af48990fbd..0debb2b7a7 100644 --- a/src/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/src/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -724,23 +724,6 @@ public class FileDataStorageManager { Log_OC.e(TAG, e.getMessage(), 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 operations = new ArrayList<>(cursor.getCount()); @@ -748,8 +731,7 @@ public class FileDataStorageManager { do { ContentValues cv = new ContentValues(); long fileId = cursor.getLong(cursor.getColumnIndex(ProviderTableMeta._ID)); - String oldFileStoragePath = - cursor.getString(cursor.getColumnIndex(ProviderTableMeta.FILE_STORAGE_PATH)); + String oldFileStoragePath = cursor.getString(cursor.getColumnIndex(ProviderTableMeta.FILE_STORAGE_PATH)); if (oldFileStoragePath.startsWith(srcPath)) { diff --git a/src/com/owncloud/android/datastorage/providers/AbstractCommandLineStoragePoint.java b/src/com/owncloud/android/datastorage/providers/AbstractCommandLineStoragePoint.java index 4c46780ccf..7784a1b828 100644 --- a/src/com/owncloud/android/datastorage/providers/AbstractCommandLineStoragePoint.java +++ b/src/com/owncloud/android/datastorage/providers/AbstractCommandLineStoragePoint.java @@ -46,7 +46,7 @@ abstract class AbstractCommandLineStoragePoint extends AbstractStoragePointProvi return false; } return process != null && process.exitValue() == COMMAND_LINE_OK_RETURN_VALUE; - }# + } String getCommandLineResult() { StringBuilder s = new StringBuilder();