* @param expression The parsed tree representation of the query
* @param problems A non-<code>null</code> list that will be used to store the {@link
* JPQLQueryProblem problems} if any was found
*/
public void validateSemantic(Expression expression, List<JPQLQueryProblem> problems) {
AbstractSemanticValidator visitor = getSemanticValidator();
try {
visitor.setProblems(problems);
expression.accept(visitor);
}
finally {
visitor.dispose();
}
}