[errorprone] PathFilter#getPathsBestEffort: fix ArrayAsKeyOfSetOrMap
See https://errorprone.info/bugpattern/ArrayAsKeyOfSetOrMap Change-Id: Ia94899bfa68db39f4eb8bfca455c92f5c888647c
This commit is contained in:
parent
cda8ffdbb4
commit
28d4b34902
|
@ -11,9 +11,10 @@
|
|||
|
||||
package org.eclipse.jgit.treewalk.filter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.eclipse.jgit.internal.JGitText;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
|
@ -91,8 +92,7 @@ public boolean shouldBeRecursive() {
|
|||
|
||||
@Override
|
||||
public Optional<Set<byte[]>> getPathsBestEffort() {
|
||||
HashSet<byte[]> s = new HashSet<>();
|
||||
s.add(pathRaw);
|
||||
Set<byte[]> s = Collections.singleton(pathRaw);
|
||||
return Optional.of(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue