]
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: