Przeglądaj źródła

Merge pull request #6344 from nextcloud/ocp

fix OCP_OVERLY_CONCRETE_PARAMETER
Andy Scherzinger 4 lat temu
rodzic
commit
fe1cd33c26

+ 1 - 1
scripts/analysis/findbugs-results.txt

@@ -1 +1 @@
-355
+345

+ 1 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -1603,7 +1603,7 @@ public class FileDataStorageManager {
      * @return
      * @return
      */
      */
     private ArrayList<ContentProviderOperation> prepareInsertShares(
     private ArrayList<ContentProviderOperation> prepareInsertShares(
-        List<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
+        Iterable<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
 
 
         ContentValues contentValues;
         ContentValues contentValues;
         // prepare operations to insert or update files to save in the given folder
         // prepare operations to insert or update files to save in the given folder

+ 1 - 2
src/main/java/com/owncloud/android/datastorage/providers/AbstractStoragePointProvider.java

@@ -24,14 +24,13 @@ package com.owncloud.android.datastorage.providers;
 import com.owncloud.android.datastorage.StoragePoint;
 import com.owncloud.android.datastorage.StoragePoint;
 
 
 import java.io.File;
 import java.io.File;
-import java.util.List;
 
 
 /**
 /**
  * @author Bartosz Przybylski
  * @author Bartosz Przybylski
  */
  */
 abstract class AbstractStoragePointProvider implements IStoragePointProvider {
 abstract class AbstractStoragePointProvider implements IStoragePointProvider {
 
 
-    boolean canBeAddedToAvailableList(List<StoragePoint> currentList, String path) {
+    boolean canBeAddedToAvailableList(Iterable<StoragePoint> currentList, String path) {
         if (path == null) {
         if (path == null) {
             return false;
             return false;
         }
         }

+ 3 - 3
src/main/java/com/owncloud/android/files/FileMenuFilter.java

@@ -226,7 +226,7 @@ public class FileMenuFilter {
         }
         }
     }
     }
 
 
-    private void filterDetails(List<Integer> toShow, List<Integer> toHide) {
+    private void filterDetails(Collection<Integer> toShow, Collection<Integer> toHide) {
         if (isSingleSelection()) {
         if (isSingleSelection()) {
             toShow.add(R.id.action_see_details);
             toShow.add(R.id.action_see_details);
         } else {
         } else {
@@ -353,7 +353,7 @@ public class FileMenuFilter {
         }
         }
     }
     }
 
 
-    private void filterOpenWith(List<Integer> toShow, List<Integer> toHide, boolean synchronizing) {
+    private void filterOpenWith(Collection<Integer> toShow, Collection<Integer> toHide, boolean synchronizing) {
         if (!isSingleFile() || !anyFileDown() || synchronizing) {
         if (!isSingleFile() || !anyFileDown() || synchronizing) {
             toHide.add(R.id.action_open_file_with);
             toHide.add(R.id.action_open_file_with);
         } else {
         } else {
@@ -407,7 +407,7 @@ public class FileMenuFilter {
         }
         }
     }
     }
 
 
-    private void filterRename(List<Integer> toShow, List<Integer> toHide, boolean synchronizing) {
+    private void filterRename(Collection<Integer> toShow, Collection<Integer> toHide, boolean synchronizing) {
         if (!isSingleSelection() || synchronizing || containsEncryptedFile() || containsEncryptedFolder()) {
         if (!isSingleSelection() || synchronizing || containsEncryptedFile() || containsEncryptedFolder()) {
             toHide.add(R.id.action_rename_file);
             toHide.add(R.id.action_rename_file);
         } else {
         } else {

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

@@ -29,6 +29,7 @@ import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
 
 
 import java.security.MessageDigest;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchAlgorithmException;
+import java.security.Principal;
 import java.security.cert.CertificateEncodingException;
 import java.security.cert.CertificateEncodingException;
 import java.security.cert.X509Certificate;
 import java.security.cert.X509Certificate;
 import java.text.DateFormat;
 import java.text.DateFormat;
@@ -214,7 +215,7 @@ public class X509CertificateViewAdapter implements SslUntrustedCertDialog.Certif
     }
     }
 
 
 
 
-    private Map<String, String> parsePrincipal(X500Principal principal) {
+    private Map<String, String> parsePrincipal(Principal principal) {
         Map<String, String> result = new HashMap<>();
         Map<String, String> result = new HashMap<>();
         String toParse = principal.getName();
         String toParse = principal.getName();
         String[] pieces = toParse.split(",");
         String[] pieces = toParse.split(",");

+ 4 - 3
src/main/java/third_parties/ezvcard_android/ContactOperations.java

@@ -563,11 +563,12 @@ public class ContactOperations {
 
 
     /**
     /**
      * Groups properties by their group name.
      * Groups properties by their group name.
+     *
      * @param properties the properties to group
      * @param properties the properties to group
-     * @return a map where the key is the group name (null for no group) and the
-     * value is the list of properties that belong to that group
+     * @return a map where the key is the group name (null for no group) and the value is the list of properties that
+     * belong to that group
      */
      */
-    private <T extends VCardProperty> Map<String, List<T>> orderPropertiesByGroup(List<T> properties) {
+    private <T extends VCardProperty> Map<String, List<T>> orderPropertiesByGroup(Iterable<T> properties) {
         Map<String, List<T>> groupedProperties = new HashMap<String, List<T>>();
         Map<String, List<T>> groupedProperties = new HashMap<String, List<T>>();
 
 
         for (T property : properties) {
         for (T property : properties) {