Skip to content

Conversation

@orpiske
Copy link
Contributor

@orpiske orpiske commented Jan 27, 2026

Summary

  • Reduce cognitive complexity in BeanInfo.chooseMethod by extracting helper methods and adding null guards
  • Reduce cognitive complexity in MethodInfo.evaluateParameterValue by extracting helper methods
  • Reduce cognitive complexity in BeanExpression.invokeOgnlMethod by extracting helper methods

Test plan

  • Unit tests pass for camel-bean module

Extract helper methods from chooseMethod: copyIfNotEmpty, filterMethodLists,
selectHandlerAnnotationMethod, hasSingleElement, selectSimpleMethodMatch,
selectFromPossibleOperations, selectByParameters.
Add null guards to removeAllAbstractMethods, removeNonMatchingMethods,
removeAllSetterOrGetterMethods.
Extract helper methods from evaluateParameterValue: clipClassSuffix,
isParameterTypeNotValue, evaluateSimpleExpression, isValidParameterValue,
convertParameterValue. Use guard clauses for early return.
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants