cziegeler commented on pull request #36:
URL: 
https://github.com/apache/sling-org-apache-sling-api/pull/36#issuecomment-953569599


   The patch looks good to me, but we need to sort out the exception part. The 
javadocs for create (and now also for ordering) state that they throw an 
UnsupportedOperationException - but the default implementation in the SPI does 
not do this.
   So we have two options:
   
   1. We remove that part from the javadoc and don't throw an 
UnsupportedOperationException
   2. We change all default methods to throw an UnsupportedOperationException
   
   Clients somehow should know whether an operation could work or is not 
supported. We can either indicate this with an exception type or with a 
capability methods (SLING-10888) (of course no one prevents us from doing both)
   I'm not sure what the better development flow is: asking first, then 
invoking the operation - which slows down every operation - or trying the 
operation directly and checking the exception type?
   


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


Reply via email to