reschke commented on code in PR #2615:
URL: https://github.com/apache/jackrabbit-oak/pull/2615#discussion_r2529767703


##########
oak-run/src/main/java/org/apache/jackrabbit/oak/run/NamespaceRegistryCommand.java:
##########
@@ -122,19 +122,19 @@ protected Root getWriteRoot() {
             };
             if (analyse || fix) {
                 NamespaceRegistryModel registryModel = 
NamespaceRegistryModel.create(root);
-                if (fix) {
-                    Map<String, String> additionalMappings = new HashMap<>();
-                    if (mappings != null) {
-                        for (String mapping : mappings) {
-                            String[] parts = mapping.split("=");
-                            if (parts.length != 2) {
-                                System.err.println("Invalid mapping: " + 
mapping);
-                                return;
-                            }
-                            additionalMappings.put(parts[0].trim(), 
parts[1].trim());
+                Map<String, String> additionalMappings = new HashMap<>();

Review Comment:
   Just checking: removing the check for "fix" is intended? 



##########
oak-run/src/main/java/org/apache/jackrabbit/oak/run/NamespaceRegistryCommand.java:
##########
@@ -51,7 +51,7 @@
  * --fix executes an operation that will attempt to repair an inconsistent the 
namespace registry.
  * <p>
  * --mappings is an option for both operations, allowing to specify additional 
namespace mappings in
- * the format "prefix=uri", which will be applied during the operation.
+ * the format "prefix=uri", which will be applied during the operation. It may 
be used multiple times

Review Comment:
   ```suggestion
    * the format "prefix=uri", which will be applied during the operation. It 
may be used multiple times.
   ```



##########
oak-run/README.md:
##########
@@ -778,6 +779,37 @@ Upgrades the JR2 DataStore cache by moving files to the 
Upload staging and the d
         --moveCache <true|false> \
         --deleteMapFile <true|false>
 
+Namespace Registry
+-------
+
+The 'namespace-registry' mode analyses and optionally repairs the 
namespace-registry of an existing oak repository.

Review Comment:
   ```suggestion
   The 'namespace-registry' mode analyses and optionally repairs the 
namespace-registry of an existing Oak repository.
   ```



-- 
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