[
https://issues.apache.org/jira/browse/CAMEL-23986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-23986:
--------------------------------
Fix Version/s: 4.22.0
> camel-yaml-dsl - routeConfiguration loses line number, source location and
> resource (construct() bypasses onNewTarget)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-23986
> URL: https://issues.apache.org/jira/browse/CAMEL-23986
> Project: Camel
> Issue Type: Bug
> Components: camel-yaml-dsl
> Affects Versions: 4.21.0
> Reporter: Federico Mariani
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.22.0
>
>
> {{RouteConfigurationDefinitionDeserializer}}
> ({{dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/.../RouteConfigurationDefinitionDeserializer.java:72-77}})
> extends {{YamlDeserializerBase}} but overrides {{construct()}} entirely and
> never calls {{onNewTarget()}} — the hook that sets {{lineNumber}},
> {{location}}, {{resource}} and CamelContext on the created definition
> ({{YamlDeserializerBase.java:142-164}}).
> {{RouteConfigurationDefinition}} is {{LineNumberAware}} (via {{NamedNode}})
> and {{ResourceAware}}, and nothing downstream compensates:
> {{RouteConfigurationBuilder.populateRoutesConfiguration()}} sets the resource
> only on the collection and {{DefaultModel.addRouteConfigurations()}}
> propagates nothing.
> Effect: every {{- routeConfiguration:}} defined in YAML ends up with
> {{lineNumber == -1}} and null location/resource, so source-location-based
> tooling (route dump, camel-jbang debugger, error messages with file:line)
> shows nothing for route configurations while plain routes (which go through
> the base-class {{construct}}) display correct locations.
> _Filed by Claude Code on behalf of Croway._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)