We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: Assume that s is a string. expression : s.contains("a") && s.contains("b") The result is always false.
The "toBoolean" method of class "com.greenpineyu.fel.function.operator.And" need some improvement.
public String toBoolean(FelNode node, FelContext ctx, int index) { List<FelNode> children = node.getChildren(); FelNode child = children.get(index); SourceBuilder method = child.toMethod(ctx); Class<?> type = method.returnType(ctx, child); //problem is here,primitive type boolean is not included. if (Boolean.class.isAssignableFrom(type) || boolean.class.isAssignableFrom(type)) { return "(" + method.source(ctx, child) + ")"; } if (String.class.isAssignableFrom(type)) { return "Boolean.valueOf(" + method.source(ctx, child) + ")"; } if (Null.class.isAssignableFrom(type)) { return "false"; } return "false"; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem:
Assume that s is a string.
expression : s.contains("a") && s.contains("b")
The result is always false.
The "toBoolean" method of class "com.greenpineyu.fel.function.operator.And" need some improvement.
The text was updated successfully, but these errors were encountered: