Source:
<code>public void onInstall() { final VDS host = (VDS) getSelectedItem(); InstallModel model = (InstallModel) getWindow(); final boolean isOVirt = host.getVdsType() == VDSType.oVirtNode; if (!model.validate(isOVirt)) <START> { <END> model.setTabToSelect(new EntityModel<Integer>(0)); return; } UpdateVdsActionParameters param = new UpdateVdsActionParameters(); param.setvds(host); param.setVdsId(host.getId()); param.setPassword(model.getUserPassword().getEntity()); param.setIsReinstallOrUpgrade(true); param.setInstallVds(true); param.setoVirtIsoFile(null); param.setOverrideFirewall(model.getOverrideIpTables().getEntity()); param.setAuthMethod(model.getAuthenticationMethod()); Provider networkProvider = (Provider) model.getNetworkProviders().getSelectedItem(); if (networkProvider != null) { param.setProviderId(networkProvider.getId()); param.setNetworkMappings((String) model.getInterfaceMappings().getEntity()); } AsyncDataProvider.getClusterById(new AsyncQuery(param, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { VDSGroup cluster = (VDSGroup) returnValue; UpdateVdsActionParameters internalParam = (UpdateVdsActionParameters) model; internalParam.setRebootAfterInstallation(cluster.supportsVirtService()); Frontend.getInstance().runAction( VdcActionType.InstallVds, internalParam, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { VdcReturnValueBase returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); } } } ); } }), host.getVdsGroupId()); }</code><technical_language>java code style</technical_language>

Target:
public void onInstall() { final VDS host = (VDS) getSelectedItem(); InstallModel model = (InstallModel) getWindow(); final boolean isOVirt = host.getVdsType() == VDSType.oVirtNode; if (!model.validate(isOVirt)) { model.setValidationFailed(new EntityModel<Boolean>(true)); return; } UpdateVdsActionParameters param = new UpdateVdsActionParameters(); param.setvds(host); param.setVdsId(host.getId()); param.setPassword(model.getUserPassword().getEntity()); param.setIsReinstallOrUpgrade(true); param.setInstallVds(true); param.setoVirtIsoFile(null); param.setOverrideFirewall(model.getOverrideIpTables().getEntity()); param.setAuthMethod(model.getAuthenticationMethod()); Provider networkProvider = (Provider) model.getNetworkProviders().getSelectedItem(); if (networkProvider != null) { param.setProviderId(networkProvider.getId()); param.setNetworkMappings((String) model.getInterfaceMappings().getEntity()); } AsyncDataProvider.getClusterById(new AsyncQuery(param, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { VDSGroup cluster = (VDSGroup) returnValue; UpdateVdsActionParameters internalParam = (UpdateVdsActionParameters) model; internalParam.setRebootAfterInstallation(cluster.supportsVirtService()); Frontend.getInstance().runAction( VdcActionType.InstallVds, internalParam, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { VdcReturnValueBase returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); } } } ); } }), host.getVdsGroupId()); }