Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2078

Profiling pipelines must not implement Configurable interface as they are already Parameterizable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2
    • 2.2
    • Blocks: Profiler
    • None
    • Patch available

    Description

      The most-recent change to both Profiling pipelines (revision 503964 in February 07) added the configuration "sax-stream" option and this was done by additionally implementing the Configurable interface. But as in BaseCachingProcessingPipeline (a base class) the interface Parameterizable is already implemented, and an Avalon component can be either one or the other [1], this is a bug. It's critical since the cache is retrieved in BaseCachingProcessingPipeline.parameterize(), but as Configurable has precedence over Parameterizable [2], the cache will be null and a NPE will be thrown during generation phase.

      [1] http://excalibur.apache.org/apidocs/org/apache/avalon/framework/parameters/Parameterizable.html
      [2] http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java?view=markup, see method postProcessBeforeInitialization()

      Attachments

        1. profiler-config-vs-param-fix.patch
          5 kB
          Alexander Klimetschek

        Activity

          People

            grek Grzegorz Kossakowski
            alexander.klimetschek Alexander Klimetschek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: