joerghoh commented on code in PR #82:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/82#discussion_r972821107
##########
src/test/java/org/apache/sling/resourceresolver/impl/mapping/InMemoryResourceProvider.java:
##########
@@ -103,7 +103,7 @@ public Iterator<Resource> findResources(@NotNull
ResolveContext<Void> ctx, Strin
.iterator();
}
- if ( "JCR-SQL2".equals(language) && "SELECT
[sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM [nt:base]
WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS NOT NULL
ORDER BY FIRST([sling:vanityPath]), [jcr:path]".equals(query) ) {
+ if ( "JCR-SQL2".equals(language) && "SELECT
[sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM [nt:base]
WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS NOT NULL
AND FIRST([sling:vanityPath]) > '' ORDER BY
FIRST([sling:vanityPath])".equals(query) ) {
Review Comment:
Would it make sense to move this query into a constant (or build a function
returning it if it needs parameters), which is used in both production code and
the tests?
--
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]