Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3444

Overriding the default locale for DRL date parsing should be possible: PackageBuilder.dateFormats should be settable

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Minor
    • None
    • 5.4.0.Beta2
    • drools-core (fusion)
    • None

    Description

      The PackageBuilder has a field dateFormats that stores the dateformatter used to parse dates in a DRL.
      However it's impossible to modify that. It always parses the DRL with the default locale.
      So, if you write a DRL on a UK server and let it compile on TH client, it will fail because it cannot parse 1-JAN-2012.

      Here's the code that doesn't support changing the dateFormat:

          public PackageBuilder( Package pkg,
                  PackageBuilderConfiguration configuration ) {
              this.dateFormats = null;//(DateFormats) this.environment.get( EnvironmentName.DATE_FORMATS );
              if (this.dateFormats == null) {
                  this.dateFormats = new DateFormatsImpl();
                  //this.environment.set( EnvironmentName.DATE_FORMATS , this.dateFormats );
              }
      

      Attachments

        Issue Links

          Activity

            People

              etirelli@redhat.com Edson Tirelli
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Archived:

                PagerDuty