A fix is available
APAR status
Closed as program error.
Error description
After updating a model from an earlier version of Rhapsody to Rhapsody 8.2, There are some instances where the code is incorrect. When a constructor initializer contains a boolean expression with a greater-than (>) symbol, this is causing Rhapsody to generate what appears to be garbled code. For example, if the ctor initializer in the model contains the following: itsClass(argument_0, argument_0 > 0, argument_0, argument_0), attribute_0(argument_0) the resulting code is: class_with_gt_initializer::class_with_gt_initializer(int argument_0) : itsClass(argument_0, argument_0 > 0, argument_0), attribute_0(argument_0), argument_0), attribute_0(argument_0) { I have tried setting CPP_CG::Class::MultiLineInitializerList to false to see if the feature to format the initializer list on multiple lines is causing the issue, but that does not resolve it.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * Rhapsody * **************************************************************** * PROBLEM DESCRIPTION: * * ISSUE WITH NON-TRIVIAL CONSTRUCTOR INITIALIZER * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
constructor initializer with the chanracters '>','<' sometimes not Roundtriped, generated correctly problem fixed. one limitation stay, if initializer contain generalization to template class the strig in the template <> section must not contain the charcters '>','<' (exept as template brackets) posible work around this limitations: - brackets around the template expresions, exapmples: superclass<(template_expersion > 1)>(init_expression) superclass<<(expe1 >1)>,<(expe2 <1)>>(init expression) -use property CPP_CG::Operation::OrderedConstructorInitializer for correct none reorder code generation -use property CPP_CG::Operation::DisableAutoGeneratedInitializer for simpler code generation and Roundtrip of constructor initialaizer, in this case the initialazer is a simple string that copied as is from the initializer field to the code in code generation and to the model in roundtrip
Temporary fix
Comments
APAR Information
APAR number
PI81878
Reported component name
TLOGIC RHAPSODY
Reported component ID
5724V74RP
Reported release
820
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-05-19
Closed date
2017-12-04
Last modified date
2017-12-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
TLOGIC RHAPSODY
Fixed component ID
5724V74RP
Applicable component levels
R820 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"820","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Document Information
Modified date:
18 October 2021