[jboss-jira] [JBoss JIRA] Created: (JBRULES-1196) Cannot specify file and dir paths with spaces using RuleAgent properties file
Shahad Ahmed (JIRA)
jira-events at lists.jboss.org
Sat Sep 15 18:31:11 EDT 2007
Cannot specify file and dir paths with spaces using RuleAgent properties file
-----------------------------------------------------------------------------
Key: JBRULES-1196
URL: http://jira.jboss.com/jira/browse/JBRULES-1196
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: All
Reporter: Shahad Ahmed
Assigned To: Mark Proctor
Fix For: 4.0.1
The RuleAgent mechanism for loading a rulebase from a properties file or via a Properties object does not support spaces in directory or file locations.
The current specification for the properties file used with a RuleAgent says that a list of files given by the file key should be space separated. Unfortunately, if a file path has a space in it (a not uncommon feature under the Windows OS) then the space is interpreted as the end of a file path and consequently the file fails to load - as the complete file path has not been read in. A similar issue exists with space-separated directories for the dir key.
Perhaps a better mechanism would be to separate files and directories using a semicolon (;) similar to the classpath separator used by java, as ; is less likely to be used in a file path in either Unix/Linux/MacOS or Windows.
I realise that the workaround here is to simply not put files in directories with spaces in their path (eminently sensible, as spaces in file paths are daft), but unfortunately working in the real world means that customers often have a set file structure and can be unwilling to changes these e.g. company policy might be to always put data files in the "Documents and Settings\.." folder in Windows.
I can see from the code that reads in the file paths that it uses a String Tokenizer to split strings on whitespace, and it would be relatively easy to change this to using semicolon as the token separator. However, one issue would be backwards compatibility with people already using space separators.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list