Skip to content

Commit

Permalink
[JBPM-10174] Sonar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Jun 2, 2023
1 parent d25686b commit 0d2883d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public ProcessInstance createProcessInstance(Process process, CorrelationKey cor
throw new IllegalArgumentException( "This process does not support parameters!" );
}
}
variableScopeInstance.setDefaultValue(process,variableScope,variableScopeInstance);
variableScopeInstance.setDefaultValues(variableScope, variableScopeInstance);
variableScopeInstance.enforceRequiredVariables();

return processInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.jbpm.process.instance.context.AbstractContextInstance;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.instance.node.CompositeContextNodeInstance;
import org.kie.api.definition.process.Process;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.process.CaseData;
import org.kie.api.runtime.process.ProcessInstance;
Expand Down Expand Up @@ -210,7 +209,7 @@ private boolean hasData(Object data) {
return data != null && (!(data instanceof CharSequence) || !data.toString().trim().isEmpty());
}

public void setDefaultValue(Process process,VariableScope variableScope,VariableScopeInstance variableScopeInstance) {
public void setDefaultValues(VariableScope variableScope, VariableScopeInstance variableScopeInstance) {
if (variableScope != null) {
for (Variable variable : variableScope.getVariables()) {
String name = variable.getName();
Expand All @@ -220,5 +219,5 @@ public void setDefaultValue(Process process,VariableScope variableScope,Variable
}
}
}
}
}
}

0 comments on commit 0d2883d

Please sign in to comment.