Skip to content

Commit 05dfa2b

Browse files
committed
Polishing.
Reformat code and reorder author tags. See #4025
1 parent 6a372ed commit 05dfa2b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
/**
3030
* An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that renders an HQL query without making any changes.
3131
*
32-
* @author TaeHyun Kang(polyglot-k)
3332
* @author Greg Turnquist
3433
* @author Christoph Strobl
34+
* @author Mark Paluch
35+
* @author TaeHyun Kang
3536
* @since 3.1
3637
*/
3738
@SuppressWarnings({ "ConstantConditions", "DuplicatedCode", "UnreachableCode" })
@@ -40,23 +41,26 @@ class HqlQueryRenderer extends HqlBaseVisitor<QueryTokenStream> {
4041
/**
4142
* Is this select clause a {@literal subquery}?
4243
*
43-
* @return boolean
44+
* @return {@literal true} is the query is a subquery; {@literal false} otherwise.
4445
*/
4546
static boolean isSubquery(ParserRuleContext ctx) {
4647

4748
while (ctx != null) {
49+
4850
if (ctx instanceof HqlParser.SubqueryContext || ctx instanceof HqlParser.CteContext) {
4951
return true;
5052
}
53+
5154
if (ctx instanceof HqlParser.SelectStatementContext ||
5255
ctx instanceof HqlParser.InsertStatementContext ||
5356
ctx instanceof HqlParser.DeleteStatementContext ||
54-
ctx instanceof HqlParser.UpdateStatementContext
55-
) {
57+
ctx instanceof HqlParser.UpdateStatementContext) {
5658
return false;
5759
}
60+
5861
ctx = ctx.getParent();
5962
}
63+
6064
return false;
6165
}
6266

0 commit comments

Comments
 (0)