This commit is contained in:
Andrea Cavalli 2022-06-22 19:07:56 +02:00
parent ee9ec179d7
commit efdbbcdc9b
2 changed files with 3 additions and 5 deletions

View File

@ -249,7 +249,7 @@
<dependency> <dependency>
<groupId>it.cavallium</groupId> <groupId>it.cavallium</groupId>
<artifactId>data-generator-runtime</artifactId> <artifactId>data-generator-runtime</artifactId>
<version>1.0.76</version> <version>1.0.77</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -1374,12 +1374,10 @@ public class SourcesGenerator {
} }
); );
deserializeMethod.addStatement( deserializeMethod.addStatement(
"$T upgraded = ($T) " + dataUpgraderFieldName + ".upgrade(($T) $$field$$" "$$field$$" + (currentVarNumber.getInt(upgradeDataTransformation.from) + 1) + "$$"
+ upgradeDataTransformation.from + " ($T) " + dataUpgraderFieldName + ".upgrade(($T) $$field$$"
+ currentVarNumber.getInt(upgradeDataTransformation.from) + "$$" + currentVarNumber.getInt(upgradeDataTransformation.from) + "$$"
+ upgradeDataTransformation.from + ")", toType, toTypeBoxed, fromTypeBoxed); + upgradeDataTransformation.from + ")", toType, toTypeBoxed, fromTypeBoxed);
deserializeMethod.addStatement(
"$$field$$" + (currentVarNumber.getInt(upgradeDataTransformation.from) + 1) + "$$"
+ upgradeDataTransformation.from + " = upgraded");
Objects.requireNonNull(currentTransformedFieldTypes.remove( Objects.requireNonNull(currentTransformedFieldTypes.remove(
upgradeDataTransformation.transformClass + "." + upgradeDataTransformation.from)); upgradeDataTransformation.transformClass + "." + upgradeDataTransformation.from));
currentTransformedFieldTypes.put( currentTransformedFieldTypes.put(