Replace Structurally script does not work for Method calls
Answered
Hello I tried to change the paramter of an method call with a script in replace using the parameter defined in the search.
Search template:
$Instance$.$MethodCall$($Parameter$)
Replace template:
$Instance$.$MethodCall$($Parameter2$)
where the $Parameter2$ has a script that is: Parameter.name.toUpperCase()
This results in:
Structural Search script threw an exception: java.lang.NullPointerException: Cannot invoke method toUpperCase() on null object
When I do the same thing on a type declaration it works
$FieldType$ $Field$;$FieldType$ $Field2$;
Field2 has script: Field.name.toUpperCase()
Why does it not work with method calls?
1 comment
Sort by
Date
Votes
There might be limitations, please check https://stackoverflow.com/a/45902585/22911640
Please sign in to leave a comment.