thomasmueller commented on code in PR #2626:
URL: https://github.com/apache/jackrabbit-oak/pull/2626#discussion_r2773986115


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java:
##########
@@ -1257,16 +1263,10 @@ public boolean isPotentiallySlow() {
     @Override
     public void verifyNotPotentiallySlow() {
         if (potentiallySlowTraversalQuery) {
-            QueryOptions.Traversal traversal = queryOptions.traversal;
-            if (traversal == Traversal.DEFAULT) {
-                // use the (configured) default
-                traversal = settings.getFailTraversal() ? Traversal.FAIL : 
Traversal.WARN;
-            } else {
-                // explicitly set in the query
-                traversal = queryOptions.traversal;
-            }
-            String caller = 
IndexUtils.getCaller(settings.getIgnoredClassNamesInCallTrace());
-            String message = "Traversal query (query without index): " + 
statement + "; called by " + caller + "; consider creating an index";
+            Traversal traversal = queryOptions.traversal == Traversal.DEFAULT ?
+                    settings.getFailTraversal() ? Traversal.FAIL : 
Traversal.WARN :
+                    queryOptions.traversal;

Review Comment:
   I actually find the earlier version a bit more readable....



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to