mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-15 04:22:09 +08:00
1.删除Operator临时变量
2.删除不引用的LOG
This commit is contained in:
@@ -19,15 +19,13 @@ public class AnyOperator extends BaseOperator {
|
||||
|
||||
WhenCondition whenCondition = OperatorHelper.convert(objects[0], WhenCondition.class);
|
||||
|
||||
boolean any = false;
|
||||
if (objects[1] instanceof Boolean) {
|
||||
any = Boolean.parseBoolean(objects[1].toString().toLowerCase());
|
||||
// any
|
||||
whenCondition.setAny(Boolean.parseBoolean(objects[1].toString().toLowerCase()));
|
||||
} else {
|
||||
throw new QLException("the parameter must be boolean type");
|
||||
}
|
||||
|
||||
whenCondition.setAny(any);
|
||||
|
||||
return whenCondition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,16 +23,14 @@ public class IdOperator extends BaseOperator {
|
||||
|
||||
Condition condition = OperatorHelper.convert(objects[0], Condition.class);
|
||||
|
||||
String id;
|
||||
if (objects[1] instanceof String) {
|
||||
id = objects[1].toString();
|
||||
// id
|
||||
condition.setId(objects[1].toString());
|
||||
} else {
|
||||
LOG.error("the parameter must be String type!");
|
||||
throw new QLException("the parameter must be String type");
|
||||
}
|
||||
|
||||
condition.setId(id);
|
||||
|
||||
return condition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,15 +19,13 @@ public class IgnoreErrorOperator extends BaseOperator {
|
||||
|
||||
WhenCondition condition = OperatorHelper.convert(objects[0], WhenCondition.class);
|
||||
|
||||
boolean ignoreError = false;
|
||||
if (objects[1] instanceof Boolean) {
|
||||
ignoreError = Boolean.parseBoolean(objects[1].toString().toLowerCase());
|
||||
// ignoreError
|
||||
condition.setErrorResume(Boolean.parseBoolean(objects[1].toString().toLowerCase()));
|
||||
} else {
|
||||
throw new QLException("The parameter must be boolean type");
|
||||
}
|
||||
|
||||
condition.setErrorResume(ignoreError);
|
||||
|
||||
return condition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class TagOperator extends BaseOperator {
|
||||
|
||||
Node node = OperatorHelper.convert(objects[0], Node.class);
|
||||
|
||||
String tag = null;
|
||||
String tag ;
|
||||
if (objects[1] instanceof String) {
|
||||
tag = objects[1].toString();
|
||||
} else {
|
||||
@@ -30,7 +30,9 @@ public class TagOperator extends BaseOperator {
|
||||
//这里为什么要clone一个呢?
|
||||
//因为tag是跟着chain走的。而在el上下文里的放的都是同一个node,如果多个同样的node tag不同,则这里必须copy
|
||||
Node copyNode = FlowBus.copyNode(node.getId());
|
||||
|
||||
if (null == copyNode){
|
||||
throw new QLException("The Node must be not null");
|
||||
}
|
||||
copyNode.setTag(tag);
|
||||
|
||||
return copyNode;
|
||||
|
||||
@@ -19,15 +19,13 @@ public class ThreadPoolOperator extends BaseOperator {
|
||||
|
||||
WhenCondition whenCondition = OperatorHelper.convert(objects[0], WhenCondition.class);
|
||||
|
||||
String threadPoolClazz = null;
|
||||
if (objects[1] instanceof String) {
|
||||
threadPoolClazz = objects[1].toString();
|
||||
// threadPoolClazz
|
||||
whenCondition.setThreadExecutorClass(objects[1].toString());
|
||||
} else {
|
||||
throw new QLException("the parameter must be String type");
|
||||
}
|
||||
|
||||
whenCondition.setThreadExecutorClass(threadPoolClazz);
|
||||
|
||||
return whenCondition;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user