prefer static Date_Format;
authorwenzelm
Sat, 08 Oct 2016 12:34:07 +0200
changeset 64102 1ec2adddf16b
parent 64101 976289c733e6
child 64103 60d163f38056
prefer static Date_Format;
src/Pure/Tools/build_log.scala
--- a/src/Pure/Tools/build_log.scala	Sat Oct 08 12:20:20 2016 +0200
+++ b/src/Pure/Tools/build_log.scala	Sat Oct 08 12:34:07 2016 +0200
@@ -89,21 +89,6 @@
     }
 
     def apply(path: Path): Log_File = apply(path.file)
-  }
-
-  class Log_File private(val name: String, val lines: List[String])
-  {
-    log_file =>
-
-    override def toString: String = name
-
-    def text: String = cat_lines(lines)
-
-    def err(msg: String): Nothing =
-      error("Error in log file " + quote(name) + ": " + msg)
-
-
-    /* date format */
 
     val Date_Format =
     {
@@ -123,11 +108,26 @@
 
       Date.Format.make(fmts, tune)
     }
+  }
+
+  class Log_File private(val name: String, val lines: List[String])
+  {
+    log_file =>
+
+    override def toString: String = name
+
+    def text: String = cat_lines(lines)
+
+    def err(msg: String): Nothing =
+      error("Error in log file " + quote(name) + ": " + msg)
+
+
+    /* date format */
 
     object Strict_Date
     {
       def unapply(s: String): Some[Date] =
-        try { Some(Date_Format.parse(s)) }
+        try { Some(Log_File.Date_Format.parse(s)) }
         catch { case exn: DateTimeParseException => log_file.err(exn.getMessage) }
     }