AI REVIEWED
Module: cli
File: cli/command/InfoCommand.java (~line 190-195)
Severity: Medium
Summary
The --to version null check occurs after the bootstrap class is loaded. If --to is missing, the expensive class loading was wasted.
Suggested Fix
Check required parameters before loading bootstrap:
if (this.toVersion == null) {
System.err.println("Error: --to version is required when using --bootstrap");
return 1;
}
final DataFixerBootstrap bootstrap = BootstrapLoader.load(this.bootstrapClass);