This commit is contained in:
Andrea Cavalli 2022-06-22 19:23:18 +02:00
parent f4fcc7d6d6
commit ac5a26601e

View File

@ -1373,11 +1373,15 @@ public class SourcesGenerator {
return fieldName;
}
);
deserializeMethod.beginControlFlow("");
deserializeMethod.addStatement(
"$$field$$" + (currentVarNumber.getInt(upgradeDataTransformation.from) + 1) + "$$"
+ upgradeDataTransformation.from + " = ($T) " + dataUpgraderFieldName + ".upgrade(($T) $$field$$"
"$T upgraded = ($T) " + dataUpgraderFieldName + ".upgrade(($T) $$field$$"
+ currentVarNumber.getInt(upgradeDataTransformation.from) + "$$"
+ upgradeDataTransformation.from + ")", toType, toTypeBoxed, fromTypeBoxed);
deserializeMethod.addStatement(
"$$field$$" + (currentVarNumber.getInt(upgradeDataTransformation.from) + 1) + "$$"
+ upgradeDataTransformation.from + " = upgraded");
deserializeMethod.endControlFlow();
Objects.requireNonNull(currentTransformedFieldTypes.remove(
upgradeDataTransformation.transformClass + "." + upgradeDataTransformation.from));
currentTransformedFieldTypes.put(