From b1f1f5df0b260f47028567c5471b11eab24696a5 Mon Sep 17 00:00:00 2001 From: Ramkumar Aiyengar Date: Sun, 14 Jun 2015 20:26:12 +0000 Subject: [PATCH] Revert r1685431: LUCENE-6564: Add milliseconds to timestamp in IW output for tests git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685461 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 3 --- .../src/java/org/apache/lucene/util/PrintStreamInfoStream.java | 2 +- .../apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java | 3 ++- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 2bcc7309035..4eaf785e13b 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -148,9 +148,6 @@ Build * LUCENE-6518: Don't report false thread leaks from IBM J9 ClassCache Reaper in test framework. (Dawid Weiss) -* LUCENE-6564: Add milliseconds to timestamp in InfoStream output for tests - (Ramkumar Aiyengar) - ======================= Lucene 5.2.1 ======================= Bug Fixes diff --git a/lucene/core/src/java/org/apache/lucene/util/PrintStreamInfoStream.java b/lucene/core/src/java/org/apache/lucene/util/PrintStreamInfoStream.java index c3fd897d20b..cc03d43c8ff 100644 --- a/lucene/core/src/java/org/apache/lucene/util/PrintStreamInfoStream.java +++ b/lucene/core/src/java/org/apache/lucene/util/PrintStreamInfoStream.java @@ -36,7 +36,7 @@ public class PrintStreamInfoStream extends InfoStream { private static final AtomicInteger MESSAGE_ID = new AtomicInteger(); protected final int messageID; - protected static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ROOT); + private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ROOT); protected final PrintStream stream; diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java index c96a59231ba..03f5afbd1f2 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java +++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java @@ -23,6 +23,7 @@ import java.util.Date; import java.util.HashSet; import java.util.Locale; import java.util.Random; +import java.util.Set; import java.util.TimeZone; import org.apache.lucene.codecs.Codec; @@ -98,7 +99,7 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule { } else { name = Thread.currentThread().getName(); } - stream.println(component + " " + messageID + " [" + dateFormat.format(new Date()) + "; " + name + "]: " + message); + stream.println(component + " " + messageID + " [" + new Date() + "; " + name + "]: " + message); } }