Bugzilla – Bug 2991
ObjectFactory >> operator for recursive string description
Last modified: 2018-09-20 03:13:27 EDT
Created attachment 3183 [details] fix Hi, We found a bug at the ObjectFactory class >> operator when parsing strings used when specifying attributes. When one class has a attribute describing another class (pointers or object factories), we may face a error. At first, we had to change the way the code looks for the closing bracket “]”. When we have a recursive class description, we must look for the last “]” in the string. Then, when looking for the “|” character as the delimiter between different pairs of attribute name and values, we can’t just look for the next “|”, as this may belong to separate attributes of the inner class. So we use the concept of level when parsing the string, increasing the level when entering a recursive description. So we can now look for the next “|” in level 0. You can find attached a patch which fix the error and a simulation scenario for tests.
Created attachment 3184 [details] TestCase