Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1196

Cannot specify file and dir paths with spaces using RuleAgent properties file

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.0.2
    • Component/s: All
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michaelneale Michael Neale
                Reporter:
                shahad Shahad Ahmed
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: