mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
PL-8851 NPE occurs when the Join-section of a custom filter specified incorrectly
This commit is contained in:
parent
c3fe2e1159
commit
c75cf76860
@ -54,6 +54,11 @@ public class Parser {
|
||||
JPA2Parser parser = createParser(join);
|
||||
JPA2Parser.join_section_return aReturn = parser.join_section();
|
||||
CommonTree tree = (CommonTree) aReturn.getTree();
|
||||
if (tree == null) {
|
||||
parser = createParser("join " + join);
|
||||
aReturn = parser.join_section();
|
||||
tree = (CommonTree) aReturn.getTree();
|
||||
}
|
||||
if (tree instanceof JoinVariableNode) {
|
||||
checkTreeForExceptions(join, tree);
|
||||
return Collections.singletonList((JoinVariableNode) tree);
|
||||
@ -62,7 +67,7 @@ public class Parser {
|
||||
.filter(node -> node instanceof JoinVariableNode)
|
||||
.map(JoinVariableNode.class::cast)
|
||||
.collect(Collectors.toList());
|
||||
joins.stream().forEach(node -> checkTreeForExceptions(join, tree));
|
||||
checkTreeForExceptions(join, tree);
|
||||
return joins;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user