joerghoh commented on a change in pull request #55:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/55#discussion_r788826776
##########
File path:
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
##########
@@ -838,20 +836,22 @@ private static String
escapeIllegalXpathSearchChars(String s) {
Map<String, List<MapEntry>> entryMap = new HashMap<>();
- // sling:vanityPath (lowercase) is the property name
+ // sling:vanityPath (lowercase) is the property name
final String queryString = "SELECT sling:vanityPath, sling:redirect,
sling:redirectStatus" +
" FROM nt:base" +
" WHERE NOT isdescendantnode('" + JCR_SYSTEM_PATH + "') and (" +
"sling:vanityPath
='"+escapeIllegalXpathSearchChars(vanityPath).replaceAll("'", "''")+"'" +
" OR sling:vanityPath ="+
"'"+escapeIllegalXpathSearchChars(vanityPath.substring(1)).replaceAll("'",
"''")+"'" +
") ORDER BY sling:vanityOrder DESC";
- ResourceResolver queryResolver = null;
-
- try {
- queryResolver =
factory.getServiceResourceResolver(factory.getServiceUserAuthenticationInfo("mapping"));
+ try (ResourceResolver queryResolver =
factory.getServiceResourceResolver(factory.getServiceUserAuthenticationInfo("mapping"));)
{
+ long count = 0;
+ long valid = 0;
Review comment:
I would suggest to name them ```countTotal``` and ```countValid```.
--
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]