# HG changeset patch # User Jie Kang # Date 1416409008 18000 # Node ID e8dcd9718b5b508d5ae01fe26eadea442373feff # Parent e2adee0f28eade492f8d3a1256c26b83e8774587 Fixed PluginMessage dates to use localized date from icedteanp-side. See PR2063. 2014-11-19 Jie Kang Fixed PluginMessage dates to use localized date from icedteanp-side. See PR2063 * netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java: Sort-by-date compares using timestamp * netx/net/sourceforge/jnlp/util/logging/headers/Header.java: 'date' is a string for the localized date and 'timestamp' is a Date for sort-by-date comparison * netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java: no longer has timestamp field, uses Header's timestamp field * netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java: 'date' acquired directly from icedteanp-side (strftime) without formatting diff -r e2adee0f28ea -r e8dcd9718b5b ChangeLog --- a/ChangeLog Fri Nov 14 14:16:24 2014 +0100 +++ b/ChangeLog Wed Nov 19 09:56:48 2014 -0500 @@ -1,3 +1,17 @@ +2014-11-19 Jie Kang + + Fixed PluginMessage dates to use localized date from icedteanp-side. + See PR2063 + * netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java: + Sort-by-date compares using timestamp + * netx/net/sourceforge/jnlp/util/logging/headers/Header.java: + 'date' is a string for the localized date and 'timestamp' is a Date + for sort-by-date comparison + * netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java: + no longer has timestamp field, uses Header's timestamp field + * netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java: + 'date' acquired directly from icedteanp-side (strftime) without formatting + 2014-11-14 Jiri Vanek Making loading of PAC provider more lenient diff -r e2adee0f28ea -r e8dcd9718b5b netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java --- a/netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java Fri Nov 14 14:16:24 2014 +0100 +++ b/netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java Wed Nov 19 09:56:48 2014 -0500 @@ -288,7 +288,7 @@ Collections.sort(sortedData, new CatchedMessageWithHeaderComparator() { @Override public int body(MessageWithHeader o1, MessageWithHeader o2) { - return o1.getHeader().date.compareTo(o2.getHeader().date); + return o1.getHeader().timestamp.compareTo(o2.getHeader().timestamp); } }); break; diff -r e2adee0f28ea -r e8dcd9718b5b netx/net/sourceforge/jnlp/util/logging/headers/Header.java --- a/netx/net/sourceforge/jnlp/util/logging/headers/Header.java Fri Nov 14 14:16:24 2014 +0100 +++ b/netx/net/sourceforge/jnlp/util/logging/headers/Header.java Wed Nov 19 09:56:48 2014 -0500 @@ -48,7 +48,8 @@ public String user = default_user; public boolean application = true; public Level level = Level.WARNING_ALL; - public Date date = new Date(); + public Date timestamp = new Date(); + public String date = timestamp.toString(); public boolean isC = false;//false=> java public boolean isClientApp = false;//false=> ITW public String caller = "unknown"; @@ -70,7 +71,8 @@ public Header(Level level, StackTraceElement[] stack, Thread thread, Date d, boolean isC) { this.application = JNLPRuntime.isWebstartApplication(); this.level = level; - this.date = d; + this.timestamp = d; + this.date = timestamp.toString(); this.isC = isC; if (stack != null) { this.caller = getCallerClass(stack); diff -r e2adee0f28ea -r e8dcd9718b5b netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java --- a/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java Fri Nov 14 14:16:24 2014 +0100 +++ b/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java Wed Nov 19 09:56:48 2014 -0500 @@ -37,13 +37,11 @@ */ package net.sourceforge.jnlp.util.logging.headers; -import java.util.Date; import java.util.regex.Pattern; public class PluginHeader extends Header { public boolean preinit; - public Date originalTimeStamp; static final String PLUGIN_DEBUG = "plugindebug "; static final String PLUGIN_DEBUG_PREINIT = "preinit_plugindebug "; static final String PLUGIN_ERROR = "pluginerror "; diff -r e2adee0f28ea -r e8dcd9718b5b netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java --- a/netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java Fri Nov 14 14:16:24 2014 +0100 +++ b/netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java Wed Nov 19 09:56:48 2014 -0500 @@ -66,11 +66,11 @@ p.level = OutputController.Level.WARNING_ALL; } String[] init = PluginHeader.whiteSpaces.split(s); - p.originalTimeStamp = new Date(Long.parseLong(init[1]) / 1000); + p.timestamp = new Date(Long.parseLong(init[1]) / 1000); String[] main = PluginHeader.bracketsPattern.split(s); p.user = main[1]; p.caller = main[5]; - p.date = FileLog.getPluginSharedFormatter().parse(main[4]); + p.date = main[4]; String[] threads = PluginHeader.threadsPattern.split(main[6]); p.thread1 = threads[2]; p.thread2 = threads[4];