gnodet opened a new pull request, #30740: URL: https://github.com/apache/camel/pull/30740
## Summary Reduces cognitive complexity in key core classes by extracting focused helper methods. Wave 2 of CAMEL-20206, targeting methods with CC 31–100 in `core/` modules. No behavioral changes — pure refactoring. ## Changes ### `camel-core-reifier` — RouteReifier (CC: 97 → ~25) - Extract `configureRouteOptions(Route)` from `doCreateRoute()`: handles tracing, message history, log mask, stream caching, and delayer configuration. - Extract `configureRoutePolicies(Route, InternalProcessor)` from `doCreateRoute()`: handles policy registration, service wiring, and all internal processor advices (inflight, JMX, lifecycle, REST binding, contract). ### `camel-support` — DefaultExchangeFormatter (CC: 91 → ~20) - Extract `appendExchangeMetadata(Exchange, StringBuilder)`: handles exchange ID, route group, route ID, exchange pattern. - Extract `appendMessageParts(Exchange, Message, StringBuilder)`: handles properties, variables, headers, body type, body. - Extract `appendException(Exchange, StringBuilder)`: handles exception and stack trace formatting. ### `camel-support` — ApiMethodParser (CC: 91 → ~40) - Extract `parseSignatureArg(String, String, String, List, boolean)`: eliminates the near-identical argument and property parsing blocks (generic type stripping, type resolution, description lookup). ### `camel-management` — DefaultManagementObjectStrategy (CC: 90 → ~20) - Extract `findManagedProcessorForConversionTypes()`: type converters, marshal/unmarshal, transform processors. - Extract `findManagedProcessorForRoutingTypes()`: routing EIPs (choice, filter, splitter, multicast, etc.), load balancers, aggregate, enrich. - Extract `findManagedProcessorForMiscTypes()`: all remaining processors (set/remove header/body/property, log, loop, bean, etc.). ## Tests All affected module test suites pass locally: - `core/camel-core-reifier` — 0 failures - `core/camel-support` — 0 failures - `core/camel-management` — 0 failures Relates to CAMEL-20206. --- _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
