You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/01/25 13:57:15 UTC

[GitHub] [sling-org-apache-sling-repoinit-parser] bdelacretaz commented on a change in pull request #6: SLING-10126 - Added [] as a postfix to Type to force a multi-value

bdelacretaz commented on a change in pull request #6:
URL: https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/6#discussion_r791737095



##########
File path: src/main/java/org/apache/sling/repoinit/parser/operations/PropertyLine.java
##########
@@ -56,6 +56,10 @@
      */
     public PropertyLine(String name, String typeString, List<String> values, boolean isDefault) throws ParseException {
         this.name = name;
+        boolean forceList = typeString != null && typeString.endsWith("[]");
+        if(forceList) {
+            typeString = typeString.substring(0, typeString.length() - 2);

Review comment:
       I would use a constant for [] to avoid this magic number




-- 
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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org