[
http://jira.jboss.com/jira/browse/JBRULES-1196?page=all ]
Michael Neale closed JBRULES-1196.
----------------------------------
Fix Version/s: 4.0.2
(was: 4.0.1)
Resolution: Done
OK done - to use spaces in a path name, put the path in double quotes (same as in
windows).
its not to be encouraged, but it works. Still use space to separate the paths. I don't
want to use ";" or ":" cause that will start a fight between unix and
windows users (won't be able to keep both happy).
Cest la vie !
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: Michael Neale
Fix For: 4.0.2
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