bdelacretaz commented on a change in pull request #17:
URL:
https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/17#discussion_r816839013
##########
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 suppose this is not currently tested, would be good to add tests to
org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java for that.
--
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]