From 02c2ab5203554cac62a8e34cdef421f2ccb0b199 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Wed, 13 Dec 2017 16:00:41 +0000 Subject: [PATCH] Use IO.getModified over importing the method --- .../sbt/librarymanagement/RichUpdateReport.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala b/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala index 518bc6979..189137008 100644 --- a/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala +++ b/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala @@ -3,7 +3,7 @@ package librarymanagement import java.io.File import java.io.FileNotFoundException -import sbt.io.IO.getModifiedTime +import sbt.io.IO /** * Provides extra methods for filtering the contents of an `UpdateReport` @@ -20,11 +20,10 @@ final class RichUpdateReport(report: UpdateReport) { // On occasion, "files" contains files like "./target/ivyhome/resolution-cache/com.example/foo/0.4.0/resolved.xml.xml", // which do not actually exist, so getModifiedTime() correctly throws an exception. For the moment, the behavior of // lastModified() is reproduced, but the non-existent file should really not be there to begin with. so, FIXME. - try { - getModifiedTime(f) - } catch { - case _: FileNotFoundException => 0L - })) + try IO.getModifiedTime(f) + catch { case _: FileNotFoundException => 0L } + ) + ) .toMap UpdateReport(report.cachedDescriptor, report.configurations, report.stats, stamps) }