Skip to content

feat(core): remove exchanges deprecated constants#19963

Merged
squakez merged 1 commit intoapache:mainfrom
squakez:chore/deprecate_3_x
Nov 19, 2025
Merged

feat(core): remove exchanges deprecated constants#19963
squakez merged 1 commit intoapache:mainfrom
squakez:chore/deprecate_3_x

Conversation

@squakez
Copy link
Copy Markdown
Contributor

@squakez squakez commented Nov 18, 2025

They have been deprecated long ago and no internal code is making use of those constants any longer.

More details in the files changes.

Description

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

They have been deprecated long ago and no internal code is making use of those constants any longer.
@github-actions
Copy link
Copy Markdown
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.

defineMapping(Exchange.CONTENT_TYPE, Message.CONTENT_TYPE);
defineMapping(Exchange.HTTP_CHARACTER_ENCODING, Message.ENCODING);
defineMapping(Exchange.HTTP_QUERY, Message.QUERY_STRING);
defineMapping(Exchange.ACCEPT_CONTENT_TYPE, Message.ACCEPT_CONTENT_TYPE);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ACCEPT_CONTENT_TYPE is never used internally. This method was a mapping, and in theory the user should have been already moved to CXF message accept content type instead.

// in case of exception we are bridged then we want to perform
// redeliveries etc.
// so we need to turn of exhausted redelivery
oldExchange.removeProperties(Exchange.REDELIVERY_EXHAUSTED);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used, the test passes locally.

public final class SoapConstants {

public static String SOAP_METHOD_NAME = "CamelSoapMethodName";
public static String SOAP_ACTION = "CamelSoapAction";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for internal use only in order to support the component. The user should changes nothing.


public static final HttpString AUTHENTICATION = new HttpString("CamelAuthentication");
public static final HttpString AUTHENTICATION_FAILURE_POLICY_ID = new HttpString("CamelAuthenticationFailurePolicyId");
@Deprecated(since = "4.17.0")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have removed as it's not in use. However, let's follow the deprecation policy and mark it now for future removal.


XMLReader xmlReader = null;
try {
// use the SAXPaserFactory which is set from exchange
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody should use this in Camel 4 since a while as it was deprecated in 3.x. We should be safe removing this piece of code. The original feature was introduced in https://issues.apache.org/jira/browse/CAMEL-7721

@squakez squakez requested review from davsclaus and oscerd November 18, 2025 14:42
@squakez squakez merged commit 8992706 into apache:main Nov 19, 2025
6 checks passed
@squakez squakez deleted the chore/deprecate_3_x branch November 19, 2025 14:50
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