Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-193

TODO class for partially implemented features

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.4
    • core, jcr
    • None

    Description

      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 system property (default setting strict) and would allow us to replace something like this:

      public void doSomething() throws RepositoryException {
          throw new UnsupportedRepositoryOperationException();
      }
      

      with code like this:

      public void doSomething() throws RepositoryException {
          TODO.unimplemented().doNothing();
      }
      

      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).

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: