title: How to avoid the "unused param" warning when overriding a method in java 1.4?
body: <p>In this code : </p>
  
  <pre><code>public class MyClass {
      private Object innerValue;
      public Object getInnerValue() {
          return this.innerValue;
      }
      public void setInnerValue(Object innerValue) {
          this.innerValue = innerValue;
      }
  }
  
  public class MyClassReadOnly extends MyClass {
      MyClassReadOnly(MyClass cls) {
          // Make a field by field copy
          super.setInnerValue(cls.getInnerValue());
      }
      public void setInnerValue(Object innerValue) {
          throw new UnsupportedOperationException(
                              "This is a read-only instance"
                          );
      }
  }
  </code></pre>
  
  <p>The compiler complains rightly about the unused parameter(never read) <em>innerValue</em> in <em>MyClassReadOnly.setInnerValue()</em>. </p>
  
  <p>I don't want to disable this kind of warnings since it's quite useful usually, and I don't want to have any warnings either to have a high signal/noise ratio.</p>
  
  <p>I cannot use the <em>@SuppressWarnings()</em> construct as another question suggested since it's Java 1.4 only.</p>
  
  <p>I thought about inserting dummy code like this, but it's not very satisfactory :</p>
  
  <pre><code>public void setInnerValue(Object innerValue) {
      if (innerValue != null) { /* Do Nothing, but keep the compiler happy */ }
      throw new UnsupportedOperationException("This is a read-only instance");
  }
  </code></pre>