Open
Description
Issue Description
Type: enhancement
Describe what feature you want
The class ParamFlowSlot#entry
method contains repeat code to check ParamFlowRule
exists.
It is better to delete first check, because the method checkFlow
is responsible for checking the relevant paramters.
class ParamFlowSlot {
@Override
public void entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count,
boolean prioritized, Object... args) throws Throwable {
// first check
if (!ParamFlowRuleManager.hasRules(resourceWrapper.getName())) {
fireEntry(context, resourceWrapper, node, count, prioritized, args);
return;
}
checkFlow(resourceWrapper, count, args);
fireEntry(context, resourceWrapper, node, count, prioritized, args);
}
void checkFlow(ResourceWrapper resourceWrapper, int count, Object... args) throws BlockException {
...
// second check
if (!ParamFlowRuleManager.hasRules(resourceWrapper.getName())) {
return;
}
...
}
}
Describe your initial design (if present)
The ParamFlowRule
only need to be checked once.
Additional context
Metadata
Metadata
Assignees
Labels
No labels