This rule is deprecated because there are already Sonarqube native rules for the same things, and will be removed soon.

Why is this an issue?

Do not unnecessarily assign values to variables. It increases the use of RAM memory.

Noncompliant Code Example

String var1 = getValue();
return var1;

String var2 = "hello"
var2 = "world"        //Non compliant cause never assigned

Compliant Solution

return getValue();