Fix compilation in FileExtensionMatchers

Java 8 can not infer types as well as Java 11 does. This means a
backport of some code that relied on Java 11's superior abilities to
infer types caused Java 8's head to explode trying to infer the same
type in 7.x. This commit addresses this by giving Java 8 the types that
it needs.
This commit is contained in:
Jason Tedor 2020-02-07 21:42:31 -05:00
parent 8b1d2c5b95
commit e541ca794f
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class FileExistenceMatchers {
if (Files.isDirectory(path)) { if (Files.isDirectory(path)) {
mismatchDescription.appendText("path " + path + " is a directory with contents\n"); mismatchDescription.appendText("path " + path + " is a directory with contents\n");
try { try {
Files.walkFileTree(path, new SimpleFileVisitor<>() { Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
@Override @Override
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {