=== Compliant solution

[source,text]
----
public final class MyFinalClass {

  private String name = "Fred";
  public void setName(String name) {
    // ...
  }
----
