Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-client/pull/337#discussion_r232140182
  
    --- Diff: 
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleObjectPermissionSet.java
 ---
    @@ -37,14 +38,77 @@
         /**
          * The set of all permissions currently granted.
          */
    -    private Set<ObjectPermission> permissions = 
Collections.<ObjectPermission>emptySet();
    +    private Set<ObjectPermission> permissions = Collections.emptySet();
     
         /**
    -     * Creates a new empty SimpleObjectPermissionSet.
    +     * Creates a new empty SimpleObjectPermissionSet. If you are not 
extending
    +     * SimpleObjectPermissionSet and only need an immutable, empty
    +     * ObjectPermissionSet, consider using {@link 
ObjectPermissionSet#EMPTY_SET}
    +     * instead.
          */
         public SimpleObjectPermissionSet() {
    --- End diff --
    
    I agree, though I'm not sure how that can be addressed here, at least 
within this PR. The various "Simple" classes have had this issue for some time, 
where it's not entirely clear what defining principle guides what each 
implementation within `org.apache.guacamole.net.auth.simple` should provide. 
Even the `...net.auth.` part of the package is a bit of a dinosaur.
    
    I think actually fixing what you describe would need to be part of a larger 
effort to restructure guacamole-ext. Some of what has been done here is a step 
in a better direction (like the new `EMPTY_SET` convenience constants) while 
yet more "Simple" classes are more status quo.


---

Reply via email to