Uploaded image for project: 'apiman (API Management)'
  1. apiman (API Management)
  2. APIMAN-287

Data Handlers are chained together too early - resulting in some 'nulls'

XMLWordPrintable

      There is a problem with these two methods:

      https://github.com/apiman/apiman/blob/master/gateway/engine/core/src/main/java/io/apiman/gateway/engine/policy/IDataPolicy.java#L41

      https://github.com/apiman/apiman/blob/master/gateway/engine/core/src/main/java/io/apiman/gateway/engine/policy/IDataPolicy.java#L50

      These methods are being called when the Chains are first created, prior to the ServiceRequest and ServiceResponse objects being created. This results in both being NULL when the above methods are invoked.

      Can we perhaps defer chaining together the data handlers until later so that they are not null?

      To reproduce, put a breakpoint in SimpleDataPolicy's getRequestDataHandler() and getResponseDataHandler() methods and run the SimpleDataPolicyTest junit test. When they get hit, you'll notice that both those params are null.

              msavy_jira Marc Savy (Inactive)
              ewittman@redhat.com Eric Wittmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: