Skip to content

Commit 17f7ce9

Browse files
committed
Update author annotation in JpqlQueryRenderer and refactor isSetQuery method for improved readability
Signed-off-by: KNU-K <[email protected]>
1 parent ea1dc95 commit 17f7ce9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/**
3333
* An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that renders a JPQL query without making any changes.
3434
*
35-
* @author polyglot-k
35+
* @author TaeHyun Kang(polyglot-k)
3636
* @author Greg Turnquist
3737
* @author Christoph Strobl
3838
* @author Mark Paluch
@@ -67,11 +67,13 @@ static boolean isSubquery(ParserRuleContext ctx) {
6767
*/
6868
static boolean isSetQuery(ParserRuleContext ctx) {
6969

70-
if (ctx instanceof JpqlParser.Set_fuctionContext) {
71-
return true;
72-
}
73-
74-
return ctx.getParent() != null && isSetQuery(ctx.getParent());
70+
while (ctx != null) {
71+
if (ctx instanceof JpqlParser.Set_fuctionContext) {
72+
return true;
73+
}
74+
ctx = ctx.getParent();
75+
}
76+
return false;
7577
}
7678

7779
@Override

0 commit comments

Comments
 (0)