[jboss-jira] [JBoss JIRA] (JBRULES-3444) Overriding the default locale for DRL date parsing should be possible: PackageBuilder.dateFormats should be settable

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Tue Apr 3 12:12:47 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey De Smet updated JBRULES-3444:
--------------------------------------

    Affects Version/s: 5.4.0.Beta2
             Priority: Minor  (was: Major)

    
> Overriding the default locale for DRL date parsing should be possible: PackageBuilder.dateFormats should be settable
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3444
>                 URL: https://issues.jboss.org/browse/JBRULES-3444
>             Project: Drools
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: drools-core (fusion)
>    Affects Versions: 5.4.0.Beta2
>            Reporter: Geoffrey De Smet
>            Assignee: Edson Tirelli
>            Priority: Minor
>
> 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:
> {code}
>     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 );
>         }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list