Jukka Zitting created OAK-193:
---------------------------------
Summary: TODO class for partially implemented features
Key: OAK-193
URL: https://issues.apache.org/jira/browse/OAK-193
Project: Jackrabbit Oak
Issue Type: New Feature
Components: core, jcr
Reporter: Jukka Zitting
Assignee: Jukka Zitting
Priority: Minor
As discussed in OAK-64, we have many cases where we need to use dummy
implementations of some features to allow higher level applications or
integration tests to work without changes. To better keep track of such cases
and to be able to control the behavior of dummy implementations at runtime, I'd
like to add an explicit {{TODO}} class for this.
The behavior of the {{TODO}} class would be controlled by a {{todo}} systen
poperty (default setting {{strict}}) and would allow us to replace something
like this:
{code}
public void doSomething() throws RepositoryException {
throw new UnsupportedRepositoryOperationException();
}
{code}
with code like this:
{code}
public void doSomething() throws RepositoryException {
TODO.unimplemented().doNothing();
}
{code}
By default ({{-Dtodo=strict}}) the {{doNothing()}} call would throw an
{{UnsupportedRepositoryOperationException}}, but with a different setting it
could instead log a warning ({{-Dtodo=log}}) or simply do nothing
({{-Dtodo=none}}).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira