File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
exist-core/src/main/java/org/exist/xquery Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -101,17 +101,17 @@ public void visitLocationStep(final LocationStep locationStep) {
101101
102102 // check query rewriters if they want to rewrite the location step
103103 Pragma optimizePragma = null ;
104- for ( final QueryRewriter rewriter : rewriters ) {
105- try {
104+ try { // Keep try-catch out of loop
105+ for ( final QueryRewriter rewriter : rewriters ) {
106106 optimizePragma = rewriter .rewriteLocationStep (locationStep );
107107 if (optimizePragma != null ) {
108108 // expression was rewritten: return
109109 hasOptimized = true ;
110110 break ;
111111 }
112- } catch (final XPathException e ) {
113- LOG .warn ("Exception called while rewriting location step: {}" , e .getMessage (), e );
114112 }
113+ } catch (final XPathException e ) {
114+ LOG .warn ("Exception called while rewriting location step: {}" , e .getMessage (), e );
115115 }
116116
117117 boolean optimize = false ;
You can’t perform that action at this time.
0 commit comments