]
George Gastaldi closed FORGE-2021.
----------------------------------
Fix Version/s: 2.10.2.Final
(was: 2.x Future)
Resolution: Done
Forge UI should not call UICommand.validate() if required inputs are
not populated
----------------------------------------------------------------------------------
Key: FORGE-2021
URL:
https://issues.jboss.org/browse/FORGE-2021
Project: Forge
Issue Type: Feature Request
Components: UI - API
Affects Versions: 2.10.1.Final
Reporter: Lincoln Baxter III
Assignee: George Gastaldi
Fix For: 2.10.2.Final
This command:
{code}public class WindupWizard implements UIWizard, UICommand
@Inject
@WithAttributes(label = "Input", required = true, description = "Input
File or Directory (a Directory is required for source mode)")
private UIInput<FileResource<?>> input;
@Override
public void validate(UIValidationContext context)
{
FileResource<?> inputValue = this.input.getValue();
File inputFile = inputValue.getUnderlyingResourceObject();
{code}
Results in an NPE when the command is called using guided execution:
{code}
[Desktop]$ windup-migrate-app
Exception when parsing/running: windup-migrate-app , null
[Desktop]$
{code}