]> source.dussan.org Git - jgit.git/commitdiff
[errorprone] AddCommand#filepattern: use a more specific type 50/204550/2
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 16 Sep 2023 20:19:41 +0000 (22:19 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 22 Sep 2023 21:31:28 +0000 (23:31 +0200)
Variable type can use a more specific type to convey more information to
callers.
private Collection<String> filepatterns;
                  ^
    (see https://errorprone.info/bugpattern/PreferredInterfaceType)

Change-Id: I68b74de65aba3bb849ef508d7dcdd8b85b0ab100

org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java

index cb3232404313a28be9ab07bf64f638550eae88ff..abad766e40225ca5b93aa51d9cc9488bd5d8dc57 100644 (file)
@@ -18,8 +18,8 @@ import static org.eclipse.jgit.lib.FileMode.TYPE_TREE;
 import java.io.IOException;
 import java.io.InputStream;
 import java.time.Instant;
-import java.util.Collection;
 import java.util.LinkedList;
+import java.util.List;
 
 import org.eclipse.jgit.api.errors.FilterFailedException;
 import org.eclipse.jgit.api.errors.GitAPIException;
@@ -55,7 +55,7 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter;
  */
 public class AddCommand extends GitCommand<DirCache> {
 
-       private Collection<String> filepatterns;
+       private List<String> filepatterns;
 
        private WorkingTreeIterator workingTreeIterator;