[
https://jira.jboss.org/jira/browse/JBID-110?page=com.atlassian.jira.plugi...
]
Boleslaw Dawidowicz updated JBID-110:
-------------------------------------
Fix Version/s: idm-1.1.0.Alpha1
(was: idm-1.0.0.CR2)
IDM API review - returned values and Exceptions
-----------------------------------------------
Key: JBID-110
URL:
https://jira.jboss.org/jira/browse/JBID-110
Project: JBoss Identity
Issue Type: Feature Request
Components: IDM
Reporter: Boleslaw Dawidowicz
Assignee: Boleslaw Dawidowicz
Fix For: idm-1.1.0.Alpha1
Every "find" type method in IDM API should be reviewed to follow proper
behaviour. Either null object should be returned or method should throw meaningful
exception. For example:
- User findUser() throws IdentityException.
The best is to have simply null returned when search fail. Other acceptable option is to
expect exact exception like "UserNotFoundException". It is not acceptable to
receive "IdentityException" when user is simply not found in identity store.
General exception like IdentityException should be reserved for system failures or more
serious runtime issues.
All other methods should have similar behaviour.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira