Bug 724678 (BRMS-571) - Wrong SimpleDateFormat in org.drools.agent.impl.PrintStreamSystemEventListener
Summary: Wrong SimpleDateFormat in org.drools.agent.impl.PrintStreamSystemEventListener
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-571
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 5.1.0.PostGA
Assignee: Tihomir Surdilovic
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-16 15:54 UTC by Jiri Locker
Modified: 2011-03-16 16:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-16 16:44:43 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-571 0 None None None Never

Description Jiri Locker 2011-03-16 15:54:28 UTC
securitylevel_name: Public

I have spotted a suspicious output from ResourceChangeScanner:

{noformat}
[java] [2011:03:74 16:03:70:debug] ResourceChangeScanner attempt to scan 10 resources
[java] [2011:03:74 16:03:125:debug] ResourceChangeScanner thread is waiting for 60 seconds.
{noformat}

It's caused by org.drools.agent.impl.PrintStreamSystemEventListener, line 29:
{noformat}
    private static SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy:MM:DD HH:MM:SS");
{noformat}
- {{D}} is day in year (should be '{{d}}' -- day in month)
- {{M}} is month in year (the first occurrence is OK, the second one should be '{{m}}' -- minute in hour)
- {{S}} is millisecond (should be '{{s}}' -- second in minute)

See [SimpleDateFormat|http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html].

I suggest to use {{"yyyy-MM-dd HH:mm:ss,SSS"}} pattern, which produces outputs like 2011-03-16 16:47:04,789.

Comment 1 Tihomir Surdilovic 2011-03-16 16:35:36 UTC
Link: Added: This issue depends JBRULES-2927


Comment 2 Tihomir Surdilovic 2011-03-16 16:44:43 UTC
Committed to 5.1.x branch


Note You need to log in before you can comment on or make changes to this bug.