Uploaded image for project: 'JBoss Enterprise BRMS Platform 5'
  1. JBoss Enterprise BRMS Platform 5
  2. BRMS-571

Wrong SimpleDateFormat in org.drools.agent.impl.PrintStreamSystemEventListener

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.1.0 GA
    • Fix Version/s: 5.1.0.PostGA
    • Component/s: BRE
    • Labels:
      None

      Description

      I have spotted a suspicious output from ResourceChangeScanner:

      [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.
      

      It's caused by org.drools.agent.impl.PrintStreamSystemEventListener, line 29:

          private static SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy:MM:DD HH:MM:SS");
      
      • 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.

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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tsurdilovic Tihomir Surdilovic
                  Reporter:
                  jlocker Jiří Locker
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: