rombert commented on a change in pull request #23:
URL:
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r831123560
##########
File path:
src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session,
List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
+ String dm = System.getProperty(PROPERTY_DEVELOPER_MODE);
Review comment:
This would make the code more compact, but largely a matter of taste.
```suggestion
String dm = System.getProperty(PROPERTY_DEVELOPER_MODE, "");
```
##########
File path:
src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session,
List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
Review comment:
Making this an instance method could help with overriding the flag
easier for testing. You can create a sub-class and then override the method to
return true not for testing.
Not sure if it's possible with the current set up though, ISTR that the OSGi
mocks don't play nicely with subclasses of the actual components.
--
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]