Commit fb8fa77d authored by Romain Bioteau's avatar Romain Bioteau
Browse files

BS-11332

Fix manual error
parent 4d9ff98b
......@@ -32,7 +32,6 @@ import org.bonitasoft.engine.expression.Expression;
import org.bonitasoft.studio.model.connectorconfiguration.ConnectorConfiguration;
import org.bonitasoft.studio.model.connectorconfiguration.ConnectorConfigurationFactory;
import org.bonitasoft.studio.model.connectorconfiguration.ConnectorParameter;
import org.bonitasoft.studio.model.expression.ExpressionFactory;
import org.bonitasoft.studio.model.process.ActorFilter;
import org.bonitasoft.studio.model.process.ProcessFactory;
import org.bonitasoft.studio.model.process.StartMessageEvent;
......@@ -86,9 +85,7 @@ public class FlowElementSwitchTest {
@Test
public void should_addUserFilterToTask_not_export_parameter_if_expression_is_null() throws Exception {
final ConnectorParameter parameter = ConnectorConfigurationFactory.eINSTANCE.createConnectorParameter();
parameter.setExpression(ExpressionFactory.eINSTANCE.createExpression());
final ConnectorConfiguration connectorConfiguration = ConnectorConfigurationFactory.eINSTANCE.createConnectorConfiguration();
connectorConfiguration.getParameters().add(parameter);
......
......@@ -500,7 +500,8 @@ public class FlowElementSwitch extends AbstractSwitch {
void addInputIfExpressionValid(final UserFilterDefinitionBuilder filterBuilder, final ConnectorParameter parameter) {
final Expression expression = (Expression) parameter.getExpression();
if (expression.getName() != null && !expression.getName().isEmpty() && !(expression.getContent() == null || expression.getContent().isEmpty())) {
if (expression != null && expression.getName() != null && !expression.getName().isEmpty()
&& !(expression.getContent() == null || expression.getContent().isEmpty())) {
filterBuilder.addInput(parameter.getKey(), EngineExpressionUtil.createExpression(parameter.getExpression()));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment