Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30092

Improve Java classes management in contributions



    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 11.5
    • Fix Version/s: Postponed
    • Component/s: Runtime


      Whenever Java classes are referenced from Runtime contributions, specific error management is needed to highlight the problem (class not found, not following expected interface).
      Custom code is also needed to instantiate the class even if expected constructor does not need arguments most of the time, and related error management is needed too.

      -> handle this consistently at the xmap and registry level to avoid custom code in most of cases.

      Uses cases to keep in mind:

      • the given class reference could be empty (to handle disablement of a contribution without re-stating the class, or to handle cases where the class is optional)
      • the class might extend a specific interface (show a nice error message when the given class does not implement the interface)
      • the error should state the target extension point to (as there might be several points with the same name in the same file, just not the same target...), see sample here:
      2021-01-28T09:22:19,283 WARN  [http-nio-] [org.nuxeo.common.xmap.registry.MapRegistry] The contribution with id 'default' on extension 'default-repository-config#configuration' has been implicitly merged: the compatibility mechanism on its descriptor class 'org.nuxeo.runtime.kv.KeyValueStoreDescriptor' detected it, and the attribute merge="true" should be added to this definition.

      + maybe handle these as runtime errors in a PR to detect such use cases by default


          Issue Links



              • Assignee:
                atchertchian Anahide Tchertchian
                atchertchian Anahide Tchertchian
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: