Fixed Sonar Critical warning: Empty While Stmt.