AI REVIEWED
Module: testkit
File: testkit/harness/MigrationTester.java (~line 306, 340)
Severity: High
Summary
FixerSetup initializes the DataFixerBuilder with Integer.MAX_VALUE as a placeholder current version and tracks maxVersion during addFix() calls. However, the builder is built with the original Integer.MAX_VALUE — the computed maxVersion is never applied.
Expected Behavior
The fixer should be built with the actual maximum version derived from the registered fixes.
Actual Behavior
// Line 306: Placeholder version
private final DataFixerBuilder builder = new DataFixerBuilder(new DataVersion(Integer.MAX_VALUE));
private int maxVersion = 0; // tracked but never used
// Line 340: Built with Integer.MAX_VALUE still
return this.builder.build();
Suggested Fix
Update the builder version before building, or initialize with the computed max:
public DataFixer build() {
// Apply computed maxVersion before building
return new DataFixerBuilder(new DataVersion(this.maxVersion))
// re-register fixes...
.build();
}
Or restructure to pass maxVersion at construction time.
AI REVIEWED
Module: testkit
File:
testkit/harness/MigrationTester.java(~line 306, 340)Severity: High
Summary
FixerSetupinitializes theDataFixerBuilderwithInteger.MAX_VALUEas a placeholder current version and tracksmaxVersionduringaddFix()calls. However, the builder is built with the originalInteger.MAX_VALUE— the computedmaxVersionis never applied.Expected Behavior
The fixer should be built with the actual maximum version derived from the registered fixes.
Actual Behavior
Suggested Fix
Update the builder version before building, or initialize with the computed max:
Or restructure to pass
maxVersionat construction time.