jaxb2-rich-contract-plugin
jaxb2-rich-contract-plugin copied to clipboard
Calls of .clone() are not casted to needed object
Tried to generate a builder with another xsd set with the flags -Ximmutable
and -Xfluent-builder
and it is generating methods using the .clone()
method but without casting the result before assigning it to the specific variable:
public<_B >void copyTo(final Hochbaustatistik.Builder<_B> _other) {
_other.ordnungsnummer = this.ordnungsnummer;
_other.identifikator = this.identifikator;
_other.strassenschluessel = this.strassenschluessel;
_other.haustypWohngebaeude = ((this.haustypWohngebaeude == null)?null:this.haustypWohngebaeude.newCopyBuilder(_other));
_other.bauabgang = ((this.bauabgang == null)?null:this.bauabgang.newCopyBuilder(_other));
_other.bauueberhang = ((this.bauueberhang == null)?null:this.bauueberhang.newCopyBuilder(_other));
_other.baufertigstellung = ((this.baufertigstellung == null)?null:this.baufertigstellung.clone());
_other.baugenehmigung = ((this.baugenehmigung == null)?null:this.baugenehmigung.newCopyBuilder(_other));
_other.heizenergie = ((this.heizenergie == null)?null:this.heizenergie.clone());
....
Still using 4.2.0.0 with jaxb-maven-plugin 4.0.6