Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-401

Teach AbstractStreamWriterGenerator to keep its mess in its own ClassLoader

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 4.0.1
    • Binding runtime
    • None

    Description

      Once we implement MDSAL-392, we'll get a static map of ClassLoaders which participate on a particular BindingRuntimeContext, without any guesswork whatsover and we get this update atomically.

      This is a boon, as we can properly construct our ClassPool, eliminating the need to use JavassistUtils.appendClassLoaderIfMissing(), as we can always find binding classes for a BindingRuntimeContext.

      The direct implication is that for a particular BindingRuntimeContext generation we can generate codecs into a properly-controller ClassLoader so they do end up being thrown with interface classes.

      This has the upshot that we do not leave crud if ever mdsal-binding-dom-adapter/codec are reloaded, hopefully fixing frozenClass exceptions once and for all.

      Furthermore we can make sure AbstractStreamWriterGenerator.generateEmitter0() runs with the codec class loader visible, meaning we can properly initialize the prototypes without having to play tricks with reflection and late value injection.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: