title: Sonar issue Assignments should not be redundant (squid:S4165)
body: <pre><code>private void updateEmployee(String employeeCode, UpdateUserDto updateUserDto){
      Employee emp = getEmpDetails(employeeCode);
      emp = updateMobile&amp;Email(emp, updateUserDto.getMobile(), updateUserDto.getMail());
      // Remove this useless assignment; "emp" already holds the assigned value along all execution paths.
  
      ...
      ...
      emp.setisActive(updateUserDto.getIsActive());
      empRepo.save(emp);
  }
  
  private Employee updateMobile&amp;Email(Employee emp, String mobile, String mail){
      if(emp.getMobile() == null &amp;&amp; (mobile != null || mobile.isBlank())){
          emp.setMobile(mobile);
      }
      if(emp.getMail() == null &amp;&amp; (getMail != null || getMail.isBlank())){
          emp.setMail(mail);
      }
      return emp;
  }
  </code></pre>
  
  <p>Due to connectivity complexity I made some functions. Above one is just for example, the code is bigger</p>
  
  <p>Remove this useless assignment; "emp" already holds the assigned value along all execution paths.</p>
  
  <p>At line 2 of updateEmployee()</p>
  
  <p>Sonar issue details</p>
  
  <pre><code>Assignments should not be redundant (squid:S4165)
  
  Noncompliant
  a = b;
  c = a;
  b = c; // Noncompliant: c and b are already the same
  
  Compilant
  a = b;
  c = a;
  </code></pre>