fixes jenkins/sonarcube issue about "Unnecessary Local Before Return"