title: When marshalling, why does JAXB not call getter method for a required attribute with a fixed value?
body: <p>I have an attribute:
  </p>
  
  <p>The associated getter method in the generated JAXB object is like this:</p>
  
  <pre><code>public String getUnits(){
      if(units == null) return "metric";
      else return units;
  }
  </code></pre>
  
  <p>getUnits() is not being called by JAXB Marshaller when marshalling and the value is not being set.
  Why would this not be called?</p>