fix sonar "Assignment of parameter 'path' is not allowed." warn