Geoffrey De Smet created JBRULES-3444:
-----------------------------------------
Summary: 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)
Reporter: Geoffrey De Smet
Assignee: Edson Tirelli
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