title: Bytecode transforming record class to be mutable
body: <p>I just saw that EBean does bytecode transformation of record class files in a way that feels odd to me and I seek an answer about whether this is legal from a JVM point of view.</p>
  <p>Apparently, it is possible to have a class file, where the class extends <code>java.lang.Record</code> and defines record component attributes (so it's a &quot;record&quot; like javac would create it), but with the following additional &quot;features&quot; which javac would not allow:</p>
  <ul>
  <li>Make fields for record components non-final</li>
  <li>Add additional fields that are not set through the canonical constructor, nor exposed through record component attributes</li>
  </ul>
  <p>To me, this seems illegal and I would have expected a JVM verification error. I would like to know if this is something that is &quot;supported&quot;, which I can build upon, or if the lack of verification is a JVM bug. Are records just a Java language feature without JVM support?! I read that final fields of records are &quot;truly final&quot; and can't be changed even through reflection and assumed there must be special JVM support that makes sure records match the Java language semantics...</p>