anchela commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/17#discussion_r816874389



##########
File path: src/main/javacc/RepoInitGrammar.jjt
##########
@@ -359,24 +362,30 @@ void removeStarLine(List<AclLine> lines) :
     }
 }
 
-AclLine privilegesLineOperation() :
-{}
+AclLine privilegesLineOperation(boolean supportsRemoveAction) :
+{  
+}
 {
     ( 
-        <REMOVE>        { return new AclLine(AclLine.Action.REMOVE); }
+        <REMOVE>        { 
+if (supportsRemoveAction) { 
+    return new AclLine(AclLine.Action.REMOVE); 
+} else { 
+    throw new IllegalArgumentException("REMOVE action not supported with 
'remove acl' statements.");

Review comment:
       i added tests both for the unsupported remove actions as well as for the 
unsupported acl-options and changed the exception to ParseException to keep it 
consistent.




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