Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6548

XQueryBuilder will override any saxon Configuration provided

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.11.2
    • Fix Version/s: 2.11.2, 2.12.0
    • Component/s: camel-saxon
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Novice

      Description

      Sometimes one wants to register a custom extension function net.sf.saxon.lib.ExtensionFunctionDefinition in the saxon xquery engine context.

      When providing XQueryBuilder.setConfiguration(Configuration configuration) with such configuration, the method will set the context and also set the initialise flag to false (line 378). This will cause XQueryBuilder.initialize(Exchange exchange) to run next time the builder is used.

      Unfortunately the initialize method on line 639 it will create a new saxon Configuration regardless of what was set in the XQueryBuilder.setConfiguration() and renders this function pretty much useless.

      The obvious solution to this problem is to check if the configuration is null before creating a new saxon configuration.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              niels.bertram Niels Bertram
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: