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 2021/01/12 21:40:48 UTC

[GitHub] [sling-org-apache-sling-feature-cpconverter] karlpauls commented on a change in pull request #46: SLING-9974: add nullability annotations

karlpauls commented on a change in pull request #46:
URL: https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/46#discussion_r556113371



##########
File path: src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/AccessControlEntry.java
##########
@@ -34,31 +36,31 @@
 
     private final List<String> restrictions = new LinkedList<>();
 
-    public AccessControlEntry(boolean isAllow, String privileges, RepoPath repositoryPath) {
+    public AccessControlEntry(boolean isAllow, @Nullable String privileges, @NotNull RepoPath repositoryPath) {
         this.isAllow = isAllow;
         this.privileges = privileges;
         this.repositoryPath = repositoryPath;
     }
 
-    public void addRestriction(String restriction) {
+    public void addRestriction(@Nullable String restriction) {
         if (restriction != null && !restriction.isEmpty()) {
             restrictions.add(restriction);
         }
     }
 
-    public String getOperation() {
+    public @NotNull String getOperation() {
         return isAllow ? "allow" : "deny";
     }
 
-    public String getPrivileges() {
+    public @Nullable String getPrivileges() {

Review comment:
       Yeah, see below.




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

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