Carlo Sogono (sogoc)
Lead System Architect
Pegasystems Inc.
sogoc Member since 2017 6 posts
Posted: February 26, 2018
Last activity: February 27, 2018
Posted: 26 Feb 2018 0:42 EST
Last activity: 27 Feb 2018 17:57 EST

String comparisons in Pega

Within data transforms, is there any difference in using @equals and == between string properties and/or string literals?

I understand that in Java, using == will compare the object reference even if the contents are identical. But in Pega (and correct me if I'm wrong) it will always compare contents and never the object reference.

I've had LSA/SSA's strongly believe that I should never use == to compare strings in data transforms, and others who believe it is perfectly fine.

Any thoughts on why I would use one over another? On looking at the Java code of @equals I can use it to avoid having to check whether the property has been set (null). It always returns false when one is null. Other than that, am I missing anything else when using == ?

Low-Code App Development Case Management
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.