Mercurial > hg > release > icedtea-web-1.5
changeset 1029:e8dcd9718b5b
Fixed PluginMessage dates to use localized date from icedteanp-side. See PR2063.
2014-11-19 Jie Kang <jkang@redhat.com>
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
author | Jie Kang <jkang@redhat.com> |
---|---|
date | Wed, 19 Nov 2014 09:56:48 -0500 |
parents | e2adee0f28ea |
children | 8e6364a2a47f |
files | ChangeLog netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPaneModel.java netx/net/sourceforge/jnlp/util/logging/headers/Header.java netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java |
diffstat | 5 files changed, 21 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <jkang@redhat.com> + + 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 <jvanek@redhat.com> Making loading of PAC provider more lenient
--- 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;
--- 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);
--- 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 ";
--- 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];