-
Bug
-
Resolution: Done
-
Major
-
1.2.2.1
-
None
The Submit script is supposed to allow rules in a list of rule scripts to be installed in a specific order. The current implementation of Submit.addRulesFromFiles(List<String> fileNames) reads in the script sand then installs them in a hash map by calling addRules(HashMap<String, String> fileNameToScriptMap). This does not guarantee that the ruels form the first file are loaded before those from the second and so on. This is important because it affects the order in which side effects are introduced. The method addRules needs to be changed to take either a two List<String> arguments or a single List< Pair<String, String>>.
Also, the method name addRules is misleading as is its javadoc. The String values in the map are whole scripts each of which may contain more than one rule. Up to now scripts have only contained rule definitions but this has always been subject to revision. They also need to be able to include directives which affect how subsequent rules are processed e.g. default helper settings, compilation options and so on. So, the method should be renamed addScripts and documented accordingly.