[ 
https://issues.apache.org/jira/browse/JDO-759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884843#comment-15884843
 ] 

Tilmann Zäschke commented on JDO-759:
-------------------------------------

I understand that this should be a general clarification, but could someone 
remind me which method this was about?

There are a number of optional features, however they mostly are required to 
throw exceptions (for good reason) when they are not supported, see Section 22 
(and 11.1.1) .

There are also various 'hints', such as retainValues, ignoreCache, evict, pin, 
unpin, fetchplans, sequence allocation and Query.compile(). However from their 
descriptions it is mostly obvious that they should not throw an exception, even 
when they are not supported.

I'm currently thinking to extend section 11.6 and rename it to "Optional 
Features" with "11.6.1 Support" and "11.6.2 Hints".

Could someone remind me how this topic started, so I'm not missing the actual 
problem?

> Spec update to clarify whether methods that are documented to be hints must 
> not throw exceptions
> ------------------------------------------------------------------------------------------------
>
>                 Key: JDO-759
>                 URL: https://issues.apache.org/jira/browse/JDO-759
>             Project: JDO
>          Issue Type: Improvement
>          Components: specification
>    Affects Versions: JDO 3.1
>            Reporter: Michael Bouschen
>            Assignee: Tilmann Zäschke
>             Fix For: JDO 3.2
>
>
> If an implementation does not support the method, it should not throw an 
> exception. But if the implementation supports the method, and e.g. there is 
> an illegal argument, it is allowed but is not required to throw 
> IllegalArgumentException. It is not allowed to throw an exception simply to 
> report that the method is not supported.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to