== Why is this an issue?

include::description.adoc[]

=== Noncompliant code example

[source,text]
----
class A {
  private int x;
  private int y;

  public void setX(int val) { // Noncompliant: field 'x' is not updated
    this.y = val;
  }

  public int getY() { // Noncompliant: field 'y' is not used in the return value
    return this.x;
  }
}
----


=== Compliant solution

[source,text]
----
class A {
  private int x;
  private int y;

  public void setX(int val) { 
    this.x = val;  
  }

  public int getY() {
    return this.y;
  }
}
----

