Resolve NXCALS-6472 "Feature py4j reserved keywords as method names"
Merge request template
COMPATIBILITY NOTE
Please make sure that this change is BACKWARDS COMPATIBLE and a new server will work correctly with clients using old APIs versions.
It may be that data sent in the new format will break the old clients.
In case of any potential incompatibility we have to inform our clients and schedule release & deployment with them.
@acc-logging-team - please have a look for approval.
Python and Java don't have the same reserved keywords. There is a problem with py4j when a name is valid in Java and a reserved keyword in Python, e.g.
JavaApp.add() is valid in Java, but calling JavaApp.app() in a Python script yields a Syntax error.
The solution done by JPype is to add, in the Python code, a trailing underscore to the reserved keyword, which for the above example would yield JavaApp.add_().
This merge request provides the necessary code to do so.
Closes NXCALS-6472