[jira] [Updated] (OAK-7232) MountPermissionProvider.load can return null
[ https://issues.apache.org/jira/browse/OAK-7232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-7232: Description: while adding missing annotations to {{MountPermissionProvider}} i noticed that the load method is actually defined as follows on the interface: {code} /** * Loads the permission entries for the given principal and path. if the given {@code entries} is {@code null}, it * will be created automatically if needed. If a {@code entries} is given, it will reuse it and the same object is * returned. If no entries can be found for the given principal or path, {@code null} is returned. * * @param entries the permission entries or {@code null} * @param principalName name of the principal * @param path access controlled path. * @return the given {@code entries}, a new collection or {@code null} */ @CheckForNull Collection load(@Nullable Collection entries, @Nonnull String principalName, @Nonnull String path); {code} IMO this means that the implementation in {{MountPermissionProvider}} could return {{null}} instead of creating an empty set. [~stillalex], wdyt? (proposed patch including the missing annoatations attached). was: while adding missing annotations to {{MountPermissionProvider}} i noticed that the load method is actually defined as follows on the interface: {code} /** * Loads the permission entries for the given principal and path. if the given {@code entries} is {@code null}, it * will be created automatically if needed. If a {@code entries} is given, it will reuse it and the same object is * returned. If no entries can be found for the given principal or path, {@code null} is returned. * * @param entries the permission entries or {@code null} * @param principalName name of the principal * @param path access controlled path. * @return the given {@code entries}, a new collection or {@code null} */ @CheckForNull Collection load(@Nullable Collection entries, @Nonnull String principalName, @Nonnull String path); {code} IMO this means that the implementation in {{MountPermissionProvider}} could return {{null}} instead of creating an empty set. [~stillalex], wdyt? (proposed patch attached). > MountPermissionProvider.load can return null > > > Key: OAK-7232 > URL: https://issues.apache.org/jira/browse/OAK-7232 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, security >Reporter: angela >Assignee: angela >Priority: Major > Attachments: OAK-7232.patch > > > while adding missing annotations to {{MountPermissionProvider}} i noticed > that the load method is actually defined as follows on the interface: > {code} > /** > * Loads the permission entries for the given principal and path. if the > given {@code entries} is {@code null}, it > * will be created automatically if needed. If a {@code entries} is > given, it will reuse it and the same object is > * returned. If no entries can be found for the given principal or path, > {@code null} is returned. > * > * @param entries the permission entries or {@code null} > * @param principalName name of the principal > * @param path access controlled path. > * @return the given {@code entries}, a new collection or {@code null} > */ > @CheckForNull > Collection load(@Nullable Collection > entries, @Nonnull String principalName, @Nonnull String path); > {code} > IMO this means that the implementation in {{MountPermissionProvider}} could > return {{null}} instead of creating an empty set. > [~stillalex], wdyt? (proposed patch including the missing annoatations > attached). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-7232) MountPermissionProvider.load can return null
[ https://issues.apache.org/jira/browse/OAK-7232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-7232: Description: while adding missing annotations to {{MountPermissionProvider}} i noticed that the load method is actually defined as follows on the interface: {code} /** * Loads the permission entries for the given principal and path. if the given {@code entries} is {@code null}, it * will be created automatically if needed. If a {@code entries} is given, it will reuse it and the same object is * returned. If no entries can be found for the given principal or path, {@code null} is returned. * * @param entries the permission entries or {@code null} * @param principalName name of the principal * @param path access controlled path. * @return the given {@code entries}, a new collection or {@code null} */ @CheckForNull Collection load(@Nullable Collection entries, @Nonnull String principalName, @Nonnull String path); {code} IMO this means that the implementation in {{MountPermissionProvider}} could return {{null}} instead of creating an empty set. [~stillalex], wdyt? (proposed patch attached). was: while adding missing annotations to {{MountPermissionProvider}} i noticed that the load method is actually defined as follows on the interface: {code} /** * Loads the permission entries for the given principal and path. if the given {@code entries} is {@code null}, it * will be created automatically if needed. If a {@code entries} is given, it will reuse it and the same object is * returned. If no entries can be found for the given principal or path, {@code null} is returned. * * @param entries the permission entries or {@code null} * @param principalName name of the principal * @param path access controlled path. * @return the given {@code entries}, a new collection or {@code null} */ @CheckForNull Collection load(@Nullable Collection entries, @Nonnull String principalName, @Nonnull String path); {code} IMO this means that the implementation in {{MountPermissionProvider}} could return {{null}} instead of creating an empty set. [~stillalex], wdyt? > MountPermissionProvider.load can return null > > > Key: OAK-7232 > URL: https://issues.apache.org/jira/browse/OAK-7232 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, security >Reporter: angela >Assignee: angela >Priority: Major > Attachments: OAK-7232.patch > > > while adding missing annotations to {{MountPermissionProvider}} i noticed > that the load method is actually defined as follows on the interface: > {code} > /** > * Loads the permission entries for the given principal and path. if the > given {@code entries} is {@code null}, it > * will be created automatically if needed. If a {@code entries} is > given, it will reuse it and the same object is > * returned. If no entries can be found for the given principal or path, > {@code null} is returned. > * > * @param entries the permission entries or {@code null} > * @param principalName name of the principal > * @param path access controlled path. > * @return the given {@code entries}, a new collection or {@code null} > */ > @CheckForNull > Collection load(@Nullable Collection > entries, @Nonnull String principalName, @Nonnull String path); > {code} > IMO this means that the implementation in {{MountPermissionProvider}} could > return {{null}} instead of creating an empty set. > [~stillalex], wdyt? (proposed patch attached). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-7232) MountPermissionProvider.load can return null
[ https://issues.apache.org/jira/browse/OAK-7232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated OAK-7232: Attachment: OAK-7232.patch > MountPermissionProvider.load can return null > > > Key: OAK-7232 > URL: https://issues.apache.org/jira/browse/OAK-7232 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, security >Reporter: angela >Assignee: angela >Priority: Major > Attachments: OAK-7232.patch > > > while adding missing annotations to {{MountPermissionProvider}} i noticed > that the load method is actually defined as follows on the interface: > {code} > /** > * Loads the permission entries for the given principal and path. if the > given {@code entries} is {@code null}, it > * will be created automatically if needed. If a {@code entries} is > given, it will reuse it and the same object is > * returned. If no entries can be found for the given principal or path, > {@code null} is returned. > * > * @param entries the permission entries or {@code null} > * @param principalName name of the principal > * @param path access controlled path. > * @return the given {@code entries}, a new collection or {@code null} > */ > @CheckForNull > Collection load(@Nullable Collection > entries, @Nonnull String principalName, @Nonnull String path); > {code} > IMO this means that the implementation in {{MountPermissionProvider}} could > return {{null}} instead of creating an empty set. > [~stillalex], wdyt? -- This message was sent by Atlassian JIRA (v7.6.3#76005)