Use of $PROPERTY, $PARAMETER, $METHOD or $CLASSMETHOD

CachéQuality release 
1.0.0
Id 
OS0048
Rule type 
Severity 

Critical

Critical
SQALE characteristic 
  • Security
    • API abuse
Tags 
design, maintainability
Remediation function 
Constant/issue
Remediation cost 
1d

ObjectScript allows indirect access to object property values via $PROPERTY, but also to parameters, methods and class methods using $PARAMETER, $METHOD and $CLASSMETHOD respectively.

For instance:

    // Write value of property bar in object reference foo:
    write $property(foo, "bar"), !

However, using those functions may be an indication that the object model of the application suffers an abstraction failure. Moreover, those functions may fail in ways that actual property/parameter references or method calls will not.

If possible, you should redesign the code so that the need for these functions is not needed.