From e5bb59bc15f09651ffe0fff95dfe5ca5c8470619 Mon Sep 17 00:00:00 2001 From: Ivan Frade Date: Tue, 10 Dec 2024 13:15:22 -0800 Subject: FileSnapshot: Delete malformed "catch" line (merge artifact?) The merge of this file left an empty catch block: error: [EmptyCatch] Caught exceptions should not be ignored Delete the catch, as the exception is a subclass of the FileSystemException catched just under it. Change-Id: I78d6b1ca8152b6eee50a69d24ca987868866ba06 --- .../src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java index 8f83a37efc..3eea16b227 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java @@ -16,7 +16,6 @@ import static org.eclipse.jgit.util.FS.FileStoreAttributes.FALLBACK_TIMESTAMP_RE import java.io.File; import java.io.IOException; import java.nio.file.FileSystemException; -import java.nio.file.NoSuchFileException; import java.nio.file.attribute.BasicFileAttributes; import java.time.Duration; import java.time.Instant; @@ -547,7 +546,6 @@ public class FileSnapshot { private static BasicFileAttributes getFileAttributes(File path) throws NoSuchElementException { try { return FS.DETECTED.fileAttributes(path); - } catch (NoSuchFileException e) { } catch (FileSystemException e) { if (!e.getMessage().endsWith("Not a directory")) { LOG.error(e.getMessage(), e); -- cgit v1.2.3