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