kwin commented on code in PR #2093:
URL: https://github.com/apache/jackrabbit-oak/pull/2093#discussion_r2166241318


##########
oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/JackrabbitSession.java:
##########
@@ -277,6 +279,15 @@ default Node getParentOrNull(@NotNull Item item) throws 
RepositoryException {
             return null;
         }
     }
+   
+    /**
+     * Returns the set of principals associated with this session.
+     * @return the set of principals associated with this session.
+     * @throws RepositoryException in case principal information cannot be 
retrieved.
+     * @since 1.81
+     */
+    @NotNull Set<Principal> getPrincipals() throws RepositoryException;

Review Comment:
   In general looks good, however I am not sure about throwing 
[`UnsupportedRepositoryOperationException`](https://developer.adobe.com/experience-manager/reference-materials/spec/javax.jcr/javadocs/jcr-2.0/javax/jcr/UnsupportedRepositoryOperationException.html?is-external=true)
   > Thrown by methods that are not supported by a particular implementation.
   
   In most case this is a particular issue with the session (and not due to a 
non-compliant implementation), therefore I consider IllegalStateException more 
suitable here (however this should be mentioned in the API) as the same request 
for another session may succeed. Feel free to directly add you commits to my 
branch or create a new one based on mine and raise a new PR.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

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

Reply via email to