JPPF Issue Tracker
Please log in to bookmark issues
CLOSED  Enhancement JPPF-322  -  Properties substitutions: implement missing uses cases, improve resources usage
Posted Sep 09, 2014 - updated Sep 09, 2014
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
  • Status
  • Assigned to
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Category
  • Resolution
  • Priority
  • Targetted for
    icon_milestones.png JPPF 5.0
Issue description
Some use cases are not properly (if at all) handled in the properties value substitutions:
  • when the name of the referenced property or environment variable is empty or only made of white spaces
  • some complex resolution scenarios result in incorrectly resolved values
Additionally, the implementation of the algorithm is complex and uses quite a lot of memory due to many maps and collections used to keep track of properties references and dependencies, with uncessary recursivity. We propose to refactor the whole thing as follows:
  • simplify the parsing of the expressions in property values by using regular exppressions (as we do for scripted values)
  • make the algorithm purely iterative and remove the need for recursion
  • remove the need for temporary maps and collections of objects that are costly in terms of memory usage
Finally, there is an inconsistency between the handling of unresolved properties references and that of unresolved environment variables references: in the former case, the value resolves to the initial literal syntax, in the latter an empty string is used. Initial literal syntax should be used in both cases, as it will make it clearer where the problem lies and thus make it easier to fix

Comment posted by
Sep 09, 20:19
implemented in trunk revision 3362