Suppress unused exception error-prone finding in `FileSystemUtils::moveFile`.
@@ -451,14 +451,14 @@ public class FileSystemUtils {
try {
from.renameTo(to);
return MoveResult.FILE_MOVED;
- } catch (IOException e) {
+ } catch (IOException unused) {
// Fallback to a copy.
FileStatus stat = from.stat(Symlinks.NOFOLLOW);
if (stat.isFile()) {
try (InputStream in = from.getInputStream();
OutputStream out = to.getOutputStream()) {
copyLargeBuffer(in, out);
- } catch (FileAccessException e1) {
+ } catch (FileAccessException e) {
// Rules can accidentally make output non-readable, let's fix that (b/150963503)
if (!from.isReadable()) {
from.setReadable(true);
@@ -467,7 +467,7 @@ public class FileSystemUtils {
copyLargeBuffer(in, out);
}
} else {
- throw e1;
+ throw e;
}
}
to.setLastModifiedTime(stat.getLastModifiedTime()); // Preserve mtime.
