Ver código fonte

Remove not needed toString() call

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>

Update src/main/java/com/owncloud/android/db/OCUpload.java

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
tobiasKaminsky 3 anos atrás
pai
commit
8401427d96

+ 1 - 3
src/main/java/com/owncloud/android/db/OCUpload.java

@@ -238,7 +238,7 @@ public class OCUpload implements Parcelable {
             return localPath + " status:" + getUploadStatus() + " result:" +
                     (getLastResult() == null ? "null" : getLastResult().getValue());
         } catch (NullPointerException e) {
-            Log_OC.d(TAG, "Exception " + e.toString());
+            Log_OC.d(TAG, "Exception", e);
             return e.toString();
         }
     }
@@ -444,6 +444,4 @@ public class OCUpload implements Parcelable {
     public void setFolderUnlockToken(String folderUnlockToken) {
         this.folderUnlockToken = folderUnlockToken;
     }
-
-    enum CanUploadFileNowStatus {NOW, LATER, FILE_GONE, ERROR}
 }

+ 1 - 2
src/main/java/com/owncloud/android/files/services/FileDownloader.java

@@ -497,8 +497,7 @@ public class FileDownloader extends Service
 
             } else {
                 // Cancel the transfer
-                Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount().toString() +
-                        " doesn't exist");
+                Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount() + " doesn't exist");
                 cancelDownloadsForAccount(mCurrentDownload.getAccount());
 
             }

+ 1 - 1
src/main/java/com/owncloud/android/operations/UpdateOCVersionOperation.java

@@ -86,7 +86,7 @@ public class UpdateOCVersionOperation extends RemoteOperation {
                         mOwnCloudVersion = new OwnCloudVersion(version);
                         if (mOwnCloudVersion.isVersionValid()) {
                             accountMngr.setUserData(mAccount, Constants.KEY_OC_VERSION, mOwnCloudVersion.getVersion());
-                            Log_OC.d(TAG, "Got new OC version " + mOwnCloudVersion.toString());
+                            Log_OC.d(TAG, "Got new OC version " + mOwnCloudVersion);
 
                             result = new RemoteOperationResult(ResultCode.OK);
                             

+ 1 - 1
src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java

@@ -617,7 +617,7 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
                 break;
 
             default:
-                status = "Uncontrolled status: " + upload.getUploadStatus().toString();
+                status = "Uncontrolled status: " + upload.getUploadStatus();
         }
         return status;
     }

+ 1 - 1
src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java

@@ -278,7 +278,7 @@ public class LocalFileListFragment extends ExtendedListFragment implements
 
         // if that's not a directory -> List its parent
         if (!directory.isDirectory()) {
-            Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
+            Log_OC.w(TAG, "You see, that is not a directory -> " + directory);
             directory = directory.getParentFile();
         }
 

+ 6 - 2
src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -136,7 +136,11 @@ import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
 import static com.owncloud.android.datamodel.OCFile.ROOT_PATH;
-import static com.owncloud.android.ui.fragment.SearchType.*;
+import static com.owncloud.android.ui.fragment.SearchType.FAVORITE_SEARCH;
+import static com.owncloud.android.ui.fragment.SearchType.FILE_SEARCH;
+import static com.owncloud.android.ui.fragment.SearchType.NO_SEARCH;
+import static com.owncloud.android.ui.fragment.SearchType.RECENTLY_MODIFIED_SEARCH;
+import static com.owncloud.android.ui.fragment.SearchType.SHARED_FILTER;
 import static com.owncloud.android.utils.DisplayUtils.openSortingOrderDialogFragment;
 
 /**
@@ -1231,7 +1235,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
 
                 // If that's not a directory -> List its parent
                 if (!directory.isFolder()) {
-                    Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
+                    Log_OC.w(TAG, "You see, that is not a directory -> " + directory);
                     directory = storageManager.getFileById(directory.getParentId());
                 }