You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/07/12 16:16:05 UTC

[camel] branch main updated: [CAMEL-19563] Refactor raw generic type usage (#10570)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 0d148b0a07f [CAMEL-19563] Refactor raw generic type usage (#10570)
0d148b0a07f is described below

commit 0d148b0a07f86469686c80ba365443c6afb2f0a8
Author: Adriano Machado <60...@users.noreply.github.com>
AuthorDate: Wed Jul 12 12:15:58 2023 -0400

    [CAMEL-19563] Refactor raw generic type usage (#10570)
    
    * [CAMEL-19563] Refactor raw generic type usage
    
    * [CAMEL-19563] More fixes
    
    * [CAMEL-19563] Fix compilation errors
    
    ---------
    
    Co-authored-by: Adriano Machado <ad...@redhat.com>
---
 .../camel/catalog/console/CatalogConsole.java      |   2 +-
 .../apache/camel/catalog/components/activemq.json  |   4 +-
 .../apache/camel/catalog/components/quartz.json    |   2 +-
 .../org/apache/camel/catalog/components/seda.json  |   2 +-
 .../camel/catalog/components/spring-redis.json     |   6 +-
 .../org/apache/camel/catalog/components/stub.json  |   2 +-
 .../org/apache/camel/catalog/models/route.json     |   2 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  |   4 +-
 .../java/org/apache/camel/maven/GenerateMojo.java  |   7 +-
 .../org/apache/camel/maven/RouteCoverageMojo.java  |   5 +-
 .../java/org/apache/camel/maven/ValidateMojo.java  |   5 +-
 .../apache/camel/parser/RouteBuilderParser.java    |  16 +--
 .../camel/parser/helper/CamelJavaParserHelper.java | 145 +++++++++------------
 .../helper/CamelJavaRestDslParserHelper.java       |  90 ++++++-------
 .../parser/helper/CamelJavaTreeParserHelper.java   |  66 ++++------
 .../apache/camel/parser/helper/CamelXmlHelper.java |   7 +-
 .../camel/parser/roaster/StatementFieldSource.java |  66 +++++-----
 .../apache/camel/component/activemq/activemq.json  |   4 +-
 .../component/activemq/ActiveMQComponent.java      |  47 ++++---
 .../component/activemq/ActiveMQConfiguration.java  |  19 ++-
 .../OriginalDestinationPropagateStrategy.java      |   3 +-
 .../apache/camel/component/amqp/AMQPComponent.java |   8 +-
 .../camel/component/amqp/AMQPJmsBinding.java       |   7 +-
 .../component/as2/api/AS2ServerConnection.java     |  36 ++---
 .../component/as2/api/protocol/ResponseMDN.java    |  15 +--
 .../camel/component/as2/api/util/EntityUtils.java  |  43 +++---
 .../component/as2/api/util/HttpMessageUtils.java   |  30 ++---
 .../camel/component/as2/AS2ClientManagerIT.java    |   4 +-
 .../component/feed/FeedEntryPollingConsumer.java   |   2 +-
 .../camel/component/file/azure/FilesConsumer.java  |   2 +-
 .../blob/operations/BlobOperationResponse.java     |   4 +-
 .../bean/validator/BeanValidatorRouteTest.java     |   8 +-
 .../bean/AbstractCamelInvocationHandler.java       |   3 +-
 .../apache/camel/component/bean/BeanComponent.java |   4 +-
 .../apache/camel/language/bean/BeanLanguage.java   |   2 +-
 .../camel/component/box/api/BoxSearchManager.java  |   2 +-
 .../component/cassandra/CassandraProducer.java     |   3 +-
 .../camel/component/cometd/CometdBinding.java      |   2 +-
 .../camel/component/consul/ConsulRegistry.java     |   2 +-
 .../camel/dataformat/csv/CsvUnmarshaller.java      |   4 +-
 .../camel/component/cxf/jaxrs/CxfRsProducer.java   |   6 +-
 .../component/debezium/DebeziumComponent.java      |   6 +-
 .../camel/component/debezium/DebeziumEndpoint.java |   2 +-
 .../component/debezium/DebeziumTestComponent.java  |   2 +-
 .../component/debezium/DebeziumDb2Component.java   |   2 +-
 .../debezium/DebeziumMongodbComponent.java         |   2 +-
 .../component/debezium/DebeziumMySqlComponent.java |   2 +-
 .../debezium/DebeziumOracleComponent.java          |   2 +-
 .../debezium/DebeziumPostgresComponent.java        |   2 +-
 .../debezium/DebeziumSqlserverComponent.java       |   2 +-
 .../camel/component/dns/policy/DnsActivation.java  |   2 +-
 .../camel/component/es/ElasticsearchProducer.java  |   5 +-
 .../camel/component/file/FileOperations.java       |   3 +-
 .../apache/camel/component/file/GenericFile.java   |   3 +-
 ...GenericFileDefaultMoveExistingFileStrategy.java |   2 +-
 .../camel/component/file/GenericFileFilter.java    |   2 +-
 .../file/strategy/FileMoveExistingStrategy.java    |  10 +-
 .../MarkerFileExclusiveReadLockStrategy.java       |  10 +-
 .../component/flink/ConvertingDataSetCallback.java |   4 +-
 .../remote/FtpDefaultMoveExistingFileStrategy.java |   2 +-
 .../SftpDefaultMoveExistingFileStrategy.java       |   2 +-
 .../component/git/consumer/GitBranchConsumer.java  |   2 +-
 .../component/git/consumer/GitCommitConsumer.java  |   3 +-
 .../component/git/consumer/GitTagConsumer.java     |   2 +-
 .../google/bigquery/integration/AsyncIT.java       |   4 +-
 .../hazelcast/queue/HazelcastQueueProducer.java    |   8 +-
 .../headersmap/FastHeadersMapFactory.java          |   4 +-
 .../HttpRestServletResolveConsumerStrategy.java    |   2 +-
 .../huaweicloud/dms/models/DmsRegion.java          |   2 +-
 .../converter/jaxb/FallbackTypeConverter.java      |   2 +-
 .../apache/camel/converter/jaxb/JaxbHelper.java    |   4 +-
 .../jdbc/DefaultJdbcPrepareStatementStrategy.java  |   4 +-
 .../jira/producer/AttachFileProducer.java          |   2 +-
 .../component/jooq/beans/AuthorRecordBean.java     |   3 +-
 .../component/jooq/beans/BookStoreRecordBean.java  |   2 +-
 .../camel/processor/jpa/AbstractJpaTest.java       |   2 +-
 .../jsonvalidator/JsonValidationException.java     |   4 +-
 .../apache/camel/jsonpath/JsonPathExpression.java  |   4 +-
 .../properties/BasePropertiesFunction.java         |   5 +-
 .../server/core/integ5/DSAnnotationProcessor.java  |   6 +-
 .../directory/server/core/integ5/Description.java  |   2 +-
 .../server/core/integ5/DSAnnotationProcessor.java  |   6 +-
 .../directory/server/core/integ5/Description.java  |   2 +-
 .../serializer/jackson/BodyDeserializer.java       |   2 +-
 .../camel/component/master/MasterConsumer.java     |   3 +-
 .../faulttolerance/FaultToleranceProcessor.java    |  10 +-
 .../faulttolerance/FaultToleranceReifier.java      |   2 +-
 .../HttpServerMultiplexChannelHandler.java         |   2 +-
 .../apache/camel/openapi/RestModelConverters.java  |  11 +-
 .../apache/camel/openapi/RestOpenApiReader.java    |  26 ++--
 .../keystone/producer/DomainProducer.java          |   2 +-
 .../swift/producer/ContainerProducer.java          |   2 +-
 .../component/optaplanner/OptaPlannerEndpoint.java |   6 +-
 .../parquet/avro/ParquetAvroDataFormat.java        |   4 +-
 .../org/apache/camel/component/quartz/quartz.json  |   2 +-
 .../camel/component/quartz/QuartzComponent.java    |   4 +-
 .../component/rss/RssEntryPollingConsumer.java     |   2 +-
 .../api/dto/approval/ApprovalResult.java           |   9 +-
 .../salesforce/api/dto/composite/SObjectNode.java  |   6 +-
 .../internal/processor/AbstractRestProcessor.java  |   2 +-
 .../internal/processor/JsonRestProcessor.java      |   2 +-
 .../salesforce/AnalyticsApiIntegrationTest.java    |   4 +-
 .../camel/component/xquery/XQueryBuilder.java      |   5 +-
 .../component/seda/SedaEndpointConfigurer.java     |   8 ++
 .../org/apache/camel/component/seda/seda.json      |   2 +-
 .../apache/camel/component/seda/SedaEndpoint.java  |   2 +-
 .../apache/camel/component/snmp/SnmpOIDPoller.java |   7 +-
 .../camel/component/snmp/SnmpTrapConsumer.java     |  16 +--
 .../camel/component/snmp/SnmpTrapProducer.java     |   2 +-
 .../DefaultListenerContainerFactory.java           |   2 +-
 .../component/redis/RedisComponentConfigurer.java  |   9 ++
 .../component/redis/RedisEndpointConfigurer.java   |  10 ++
 .../apache/camel/component/redis/spring-redis.json |   6 +-
 .../camel/component/redis/RedisComponent.java      |   6 +-
 .../camel/component/redis/RedisConfiguration.java  |  18 +--
 .../camel/component/redis/RedisEndpoint.java       |   5 +-
 .../idempotent/RedisIdempotentRepository.java      |   3 +-
 .../camel/component/sql/DefaultSqlEndpoint.java    |  14 +-
 .../sql/DefaultSqlPrepareStatementStrategy.java    |  11 +-
 .../camel/component/sql/ResultSetIterator.java     |   6 +-
 .../BatchCallableStatementCreatorFactory.java      |   5 +-
 .../sql/stored/CallableStatementWrapper.java       |   2 +-
 .../sql/stored/TemplateStoredProcedure.java        |  15 +--
 .../sql/stored/template/ast/ParseHelper.java       |   6 +-
 .../org/apache/camel/component/stub/stub.json      |   2 +-
 .../spring/junit5/CamelAnnotationsHandler.java     |  26 ++--
 .../test/spring/junit5/CamelSpringTestHelper.java  |   1 +
 .../spring/junit5/RouteCoverageEventNotifier.java  |   6 +-
 .../AbstractSpringSecurityBearerTokenTest.java     |   2 +-
 .../camel/component/undertow/UndertowEndpoint.java |   4 +-
 .../undertow/handlers/RestRootHandler.java         |   4 +-
 .../vertx/common/VertxJsonArrayConverter.java      |   4 +-
 .../camel/component/vertx/VertxConsumer.java       |   6 +-
 .../camel/component/web3j/Web3jEndpoint.java       |   4 +-
 .../camel/component/web3j/Web3jProducer.java       |  10 +-
 .../ZookeeperGroupListenerSupport.java             |  13 +-
 .../zookeepermaster/ZookeeperGroupSupport.java     |   9 +-
 .../zookeepermaster/group/internal/ChildData.java  |   7 +-
 .../group/internal/CompositeOperation.java         |   2 +-
 .../group/internal/DelegateZooKeeperGroup.java     |   2 +-
 .../internal/DelegateZooKeeperMultiGroup.java      |   2 +-
 .../group/internal/EventOperation.java             |   7 +-
 .../group/internal/GetDataOperation.java           |  10 +-
 .../group/internal/RefreshOperation.java           |  10 +-
 .../group/internal/SequenceComparator.java         |   4 +-
 .../group/internal/UpdateOperation.java            |   2 +-
 .../group/internal/ZooKeeperGroup.java             |  27 ++--
 .../camel/spi/CamelInternalProcessorAdvice.java    |   4 +-
 .../camel/impl/engine/AbstractDynamicRegistry.java |   4 +-
 .../camel/impl/engine/CamelInternalProcessor.java  |  30 ++---
 .../impl/engine/DefaultCamelBeanPostProcessor.java |  41 +++---
 .../org/apache/camel/impl/engine/DefaultRoute.java |   6 +-
 .../camel/impl/engine/DurationRoutePolicy.java     |   4 +-
 .../camel/impl/engine/IntrospectionSupport.java    |  12 +-
 .../impl/engine/SharedCamelInternalProcessor.java  |  15 +--
 .../org/apache/camel/converter/IOConverter.java    |   4 +-
 .../org/apache/camel/catalog/impl/URISupport.java  |   6 +-
 .../camel/language/csimple/CSimpleHelper.java      |  10 +-
 .../camel/language/simple/SimpleLanguage.java      |   6 +-
 .../resources/org/apache/camel/model/route.json    |   2 +-
 .../org/apache/camel/model/RouteDefinition.java    |  14 +-
 .../camel/model/RouteTemplateDefinition.java       |   2 +-
 .../org/apache/camel/processor/ContractAdvice.java |   2 +-
 .../camel/processor/RecipientListProcessor.java    |   7 +-
 .../processor/resume/TransientResumeStrategy.java  |   8 +-
 .../org/apache/camel/reifier/DisabledReifier.java  |   4 +-
 .../org/apache/camel/reifier/ProcessorReifier.java |  17 ++-
 .../camel/builder/AddRoutesAtRuntimeTest.java      |   4 +-
 .../builder/ExpressionBuilderConcurrencyTest.java  |   4 +-
 .../bean/BeanReturnCallableReturnNullTest.java     |  17 +--
 .../component/bean/BeanReturnCallableTest.java     |   9 +-
 .../bean/BeanWithHeadersAndBodyInject3Test.java    |   4 +-
 .../issues/BeanInfoSingleMethodServiceTest.java    |   2 +-
 .../file/FileProducerMoveExistingStrategyTest.java |   2 +-
 .../AggregationStrategyGroupedBodyTest.java        |   2 +-
 .../org/apache/camel/main/BaseMainSupport.java     |  16 +--
 .../InstrumentationInterceptStrategy.java          |  10 +-
 .../management/JmxManagementLifecycleStrategy.java | 131 ++++---------------
 .../camel/management/ManagedCamelContextImpl.java  |   4 +-
 .../management/mbean/ManagedDynamicRouter.java     |   6 +-
 .../management/mbean/ManagedEndpointRegistry.java  |   7 +-
 .../management/mbean/ManagedRecipientList.java     |   6 +-
 .../camel/management/mbean/ManagedRoutingSlip.java |   6 +-
 .../mbean/ManagedRuntimeEndpointRegistry.java      |   2 +-
 .../camel/management/mbean/ManagedThreads.java     |   2 +-
 .../mbean/ManagedTransformerRegistry.java          |   7 +-
 .../management/mbean/ManagedValidatorRegistry.java |   7 +-
 .../apache/camel/support/InputStreamIterator.java  |   4 +-
 .../org/apache/camel/support/NormalizedUri.java    |   2 +-
 .../camel/support/PropertyBindingSupport.java      |  23 ++--
 .../support/RestConsumerContextPathMatcher.java    |  27 ++--
 .../camel/support/builder/ExpressionBuilder.java   |   5 +-
 .../camel/support/jndi/JndiBeanRepository.java     |   4 +-
 .../support/management/MBeanInfoAssembler.java     |  64 +++------
 .../idempotent/FileIdempotentRepository.java       |  16 +--
 .../apache/camel/support/resume/AdapterHelper.java |   5 +-
 .../BasicResumeStrategyConfigurationBuilder.java   |   2 +-
 .../RestConsumerContextPathMatcherTest.java        |  10 +-
 .../org/apache/camel/util/CollectionHelper.java    |  15 +--
 .../org/apache/camel/util/ReflectionHelper.java    |  10 +-
 .../java/org/apache/camel/util/URISupport.java     |   9 +-
 .../java/org/apache/camel/xml/jaxb/JaxbHelper.java |   7 +-
 .../java/org/apache/camel/yaml/io/YamlWriter.java  |   5 +-
 .../dsl/ActivemqComponentBuilderFactory.java       |   4 +-
 .../dsl/jbang/core/commands/CodeRestGenerator.java |   2 +-
 .../commands/catalog/KameletCatalogHelper.java     |  11 +-
 .../test/infra/aws2/clients/AWSSDKClientUtils.java |  56 ++++----
 .../camel/tooling/util/ReflectionHelper.java       |  12 +-
 .../camel/tooling/util/srcgen/JavaClass.java       |   9 +-
 .../maven/AbstractApiMethodGeneratorMojo.java      |  10 +-
 .../camel/maven/AbstractGeneratorMojoTest.java     |   5 +-
 .../apache/camel/maven/CamelSpringNamespace.java   |   2 +-
 .../main/java/org/apache/camel/maven/RunMojo.java  |   6 +-
 .../packaging/AbstractGenerateConfigurerMojo.java  |  10 +-
 .../camel/maven/packaging/DynamicClassLoader.java  |   4 +-
 .../camel/maven/packaging/EndpointDslMojo.java     |  17 ++-
 .../packaging/EndpointSchemaGeneratorMojo.java     |   7 +-
 .../maven/packaging/PrepareCamelMainMojo.java      |   2 +-
 .../maven/packaging/PrepareKameletMainMojo.java    |   5 +-
 .../camel/maven/packaging/XRefCheckMojo.java       |   2 +-
 .../camel/maven/packaging/generics/ClassUtil.java  |  29 ++---
 .../maven/packaging/generics/JavadocUtil.java      |   2 +-
 .../generator/openapi/AbstractGenerateMojo.java    |   2 +-
 223 files changed, 952 insertions(+), 1157 deletions(-)

diff --git a/catalog/camel-catalog-console/src/main/java/org/apache/camel/catalog/console/CatalogConsole.java b/catalog/camel-catalog-console/src/main/java/org/apache/camel/catalog/console/CatalogConsole.java
index c339cb1c5e6..5679e63537f 100644
--- a/catalog/camel-catalog-console/src/main/java/org/apache/camel/catalog/console/CatalogConsole.java
+++ b/catalog/camel-catalog-console/src/main/java/org/apache/camel/catalog/console/CatalogConsole.java
@@ -98,7 +98,7 @@ public class CatalogConsole extends AbstractDevConsole {
         return root;
     }
 
-    private ArtifactModel findOtherModel(String artifactId) {
+    private ArtifactModel<?> findOtherModel(String artifactId) {
         // is it a mist component
         for (String name : catalog.findOtherNames()) {
             OtherModel model = catalog.otherModel(name);
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json
index 4e2e512fe8c..a4105c2bcb9 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/activemq.json
@@ -30,8 +30,8 @@
     "jmsMessageType": { "index": 5, "kind": "property", "displayName": "Jms Message Type", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Allows you to force the use o [...]
     "replyTo": { "index": 6, "kind": "property", "displayName": "Reply To", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Provides an explicit ReplyTo destination (overrides any incoming value of Message.getJMSReplyTo() in consumer)." },
     "testConnectionOnStartup": { "index": 7, "kind": "property", "displayName": "Test Connection On Startup", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Specifies whether to test the connection on startup. This ensures that when Came [...]
-    "usePooledConnection": { "index": 8, "kind": "property", "displayName": "Use Pooled Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "description": "Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be use [...]
-    "useSingleConnection": { "index": 9, "kind": "property", "displayName": "Use Single Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Enables or disables whether a Spring SingleConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling wil [...]
+    "usePooledConnection": { "index": 8, "kind": "property", "displayName": "Use Pooled Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "description": "Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used r [...]
+    "useSingleConnection": { "index": 9, "kind": "property", "displayName": "Use Single Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Enables or disables whether a Spring SingleConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will b [...]
     "acknowledgementModeName": { "index": 10, "kind": "property", "displayName": "Acknowledgement Mode Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "SESSION_TRANSACTED", "CLIENT_ACKNOWLEDGE", "AUTO_ACKNOWLEDGE", "DUPS_OK_ACKNOWLEDGE" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "AUTO_ACKNOWLEDGE", "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "conf [...]
     "artemisConsumerPriority": { "index": 11, "kind": "property", "displayName": "Artemis Consumer Priority", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Consumer priorities allow you to ensure that high priority consumers receive messages while they  [...]
     "asyncConsumer": { "index": 12, "kind": "property", "displayName": "Async Consumer", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsu [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json
index de40a56974f..75d56dd09e0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/quartz.json
@@ -32,7 +32,7 @@
     "autowiredEnabled": { "index": 7, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
     "scheduler": { "index": 8, "kind": "property", "displayName": "Scheduler", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.quartz.Scheduler", "deprecated": false, "autowired": true, "secret": false, "description": "To use the custom configured Quartz scheduler, instead of creating a new Scheduler." },
     "schedulerFactory": { "index": 9, "kind": "property", "displayName": "Scheduler Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.quartz.SchedulerFactory", "deprecated": false, "autowired": false, "secret": false, "description": "To use the custom SchedulerFactory which is used to create the Scheduler." },
-    "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the scheduler should be auto started. This options is default true" },
+    "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started. This option is default true" },
     "interruptJobsOnShutdown": { "index": 11, "kind": "property", "displayName": "Interrupt Jobs On Shutdown", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to interrupt jobs on shutdown which forces the scheduler to shutdown quicker and attempt to interrupt any running jobs. If this is enabled then any running jobs can fail d [...]
   },
   "properties": {
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/seda.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/seda.json
index e88405fcb57..26ca6914a4d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/seda.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/seda.json
@@ -52,6 +52,6 @@
     "timeout": { "index": 15, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value." },
     "waitForTaskToComplete": { "index": 16, "kind": "parameter", "displayName": "Wait For Task To Complete", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.WaitForTaskToComplete", "enum": [ "Never", "IfReplyExpected", "Always" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "IfReplyExpected", "description": "Option to specify whether the caller should wait for the async task to complete or not befo [...]
     "lazyStartProducer": { "index": 17, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
-    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
+    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue<org.apache.camel.Exchange>", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
   }
 }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-redis.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-redis.json
index dc2ba9fd0a7..091832943e3 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-redis.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-redis.json
@@ -22,7 +22,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "redisTemplate": { "index": 0, "kind": "property", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate", "deprecated": false, "autowired": true, "secret": false, "description": "Reference to a pre-configured RedisTemplate instance to use." },
+    "redisTemplate": { "index": 0, "kind": "property", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate<java.lang.Object, java.lang.Object>", "deprecated": false, "autowired": true, "secret": false, "description": "Reference to a pre-configured RedisTemplate instance to use." },
     "bridgeErrorHandler": { "index": 1, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...]
     "lazyStartProducer": { "index": 2, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
     "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
@@ -64,8 +64,8 @@
     "channels": { "index": 2, "kind": "parameter", "displayName": "Channels", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "List of topic names or name patterns to subscribe to. Multiple names can be separated by comma." },
     "command": { "index": 3, "kind": "parameter", "displayName": "Command", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.redis.Command", "enum": [ "PING", "SET", "GET", "QUIT", "EXISTS", "DEL", "TYPE", "FLUSHDB", "KEYS", "RANDOMKEY", "RENAME", "RENAMENX", "RENAMEX", "DBSIZE", "EXPIRE", "EXPIREAT", "TTL", "SELECT", "MOVE", "FLUSHALL", "GETSET", "MGET", "SETNX", "SETEX", "MSET", "MSETNX", "DECRBY", "DECR", "INCRBY", "INCR", "A [...]
     "connectionFactory": { "index": 4, "kind": "parameter", "displayName": "Connection Factory", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.connection.RedisConnectionFactory", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisConnectionFactory ins [...]
-    "redisTemplate": { "index": 5, "kind": "parameter", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisTemplate instance to use." },
-    "serializer": { "index": 6, "kind": "parameter", "displayName": "Serializer", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.serializer.RedisSerializer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisSerializer instance to use." },
+    "redisTemplate": { "index": 5, "kind": "parameter", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate<java.lang.Object, java.lang.Object>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisTemplate [...]
+    "serializer": { "index": 6, "kind": "parameter", "displayName": "Serializer", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.serializer.RedisSerializer<java.lang.Object>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisSerializer instance to use." },
     "bridgeErrorHandler": { "index": 7, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the lik [...]
     "exceptionHandler": { "index": 8, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
     "exchangePattern": { "index": 9, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stub.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stub.json
index 53a56f8a7ae..3facd275f3c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stub.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/stub.json
@@ -53,6 +53,6 @@
     "timeout": { "index": 15, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value." },
     "waitForTaskToComplete": { "index": 16, "kind": "parameter", "displayName": "Wait For Task To Complete", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.WaitForTaskToComplete", "enum": [ "Never", "IfReplyExpected", "Always" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "IfReplyExpected", "description": "Option to specify whether the caller should wait for the async task to complete or not befo [...]
     "lazyStartProducer": { "index": 17, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
-    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
+    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue<org.apache.camel.Exchange>", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
   }
 }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
index ccf9da3d56e..06b5f840e04 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
@@ -26,7 +26,7 @@
     "errorHandlerRef": { "index": 11, "kind": "attribute", "displayName": "Error Handler", "label": "error", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the bean ref name of the error handler builder to use on this route" },
     "routePolicyRef": { "index": 12, "kind": "attribute", "displayName": "Route Policy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to custom org.apache.camel.spi.RoutePolicy to use by the route. Multiple policies can be configured by separating values using comma." },
     "shutdownRoute": { "index": 13, "kind": "attribute", "displayName": "Shutdown Route", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRoute", "enum": [ "Default", "Defer" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shutdown the route." },
-    "shutdownRunningTask": { "index": 14, "kind": "attribute", "displayName": "Shutdown Running Task", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRunningTask", "enum": [ "CompleteCurrentTaskOnly", "CompleteAllTasks" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shutdown the route." },
+    "shutdownRunningTask": { "index": 14, "kind": "attribute", "displayName": "Shutdown Running Task", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRunningTask", "enum": [ "CompleteCurrentTaskOnly", "CompleteAllTasks" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shut down the route." },
     "input": { "index": 15, "kind": "element", "displayName": "Input", "required": true, "type": "object", "javaType": "org.apache.camel.model.FromDefinition", "oneOf": [ "from" ], "deprecated": false, "autowired": false, "secret": false, "description": "Input to the route." },
     "outputs": { "index": 16, "kind": "element", "displayName": "Outputs", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "mul [...]
     "disabled": { "index": 17, "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index ffb42549bd7..ba70d13b323 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -439,7 +439,7 @@ Enriches a message with data from a secondary resource
     <xs:annotation>
       <xs:documentation xml:lang="en">
 <![CDATA[
-Camel error handling.
+Error handler settings
 ]]>
       </xs:documentation>
     </xs:annotation>
@@ -11759,7 +11759,7 @@ To control how to shutdown the route.
           <xs:annotation>
             <xs:documentation xml:lang="en">
 <![CDATA[
-To control how to shutdown the route.
+To control how to shut down the route.
 ]]>
             </xs:documentation>
           </xs:annotation>
diff --git a/catalog/camel-csimple-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java b/catalog/camel-csimple-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java
index afaf3b594c3..273df21f67f 100644
--- a/catalog/camel-csimple-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java
+++ b/catalog/camel-csimple-maven-plugin/src/main/java/org/apache/camel/maven/GenerateMojo.java
@@ -180,10 +180,9 @@ public class GenerateMojo extends AbstractExecMojo {
                     // parse the java source code and find Camel RouteBuilder classes
                     String fqn = file.getPath();
                     String baseDir = ".";
-                    JavaType out = Roaster.parse(file);
+                    JavaType<?> out = Roaster.parse(file);
                     // we should only parse java classes (not interfaces and enums etc)
-                    if (out instanceof JavaClassSource) {
-                        JavaClassSource clazz = (JavaClassSource) out;
+                    if (out instanceof JavaClassSource clazz) {
                         RouteBuilderParser.parseRouteBuilderCSimpleExpressions(clazz, baseDir, fqn, fileCSimpleExpressions);
                         csimpleExpressions.addAll(fileCSimpleExpressions);
                     }
@@ -247,7 +246,7 @@ public class GenerateMojo extends AbstractExecMojo {
                 classes.forEach(c -> w.write(c.getFqn() + "\n"));
                 String fileName = RESOURCE_FILE;
                 outputResourceDir.mkdirs();
-                boolean saved = updateResource(outputResourceDir.toPath().resolve(RESOURCE_FILE), w.toString());
+                boolean saved = updateResource(outputResourceDir.toPath().resolve(fileName), w.toString());
                 if (saved) {
                     getLog().info("Generated csimple resource file: " + fileName);
                 }
diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
index e05dc7ac190..be9f9328229 100644
--- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
+++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
@@ -160,10 +160,9 @@ public class RouteCoverageMojo extends AbstractExecMojo {
                 try {
                     // parse the java source code and find Camel RouteBuilder classes
                     String fqn = file.getPath();
-                    JavaType out = Roaster.parse(file);
+                    JavaType<?> out = Roaster.parse(file);
                     // we should only parse java classes (not interfaces and enums etc)
-                    if (out instanceof JavaClassSource) {
-                        JavaClassSource clazz = (JavaClassSource) out;
+                    if (out instanceof JavaClassSource clazz) {
                         List<CamelNodeDetails> result = RouteBuilderParser.parseRouteBuilderTree(clazz, fqn, true);
                         routeTrees.addAll(result);
                     }
diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
index 310f658cca9..2de29d69d40 100644
--- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
+++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
@@ -594,10 +594,9 @@ public class ValidateMojo extends AbstractExecMojo {
             // parse the java source code and find Camel RouteBuilder classes
             String fqn = file.getPath();
             String baseDir = ".";
-            JavaType out = Roaster.parse(file);
+            JavaType<?> out = Roaster.parse(file);
             // we should only parse java classes (not interfaces and enums etc)
-            if (out instanceof JavaClassSource) {
-                JavaClassSource clazz = (JavaClassSource) out;
+            if (out instanceof JavaClassSource clazz) {
                 RouteBuilderParser.parseRouteBuilderEndpoints(clazz, baseDir, fqn, fileEndpoints, unparsable, includeTest);
                 RouteBuilderParser.parseRouteBuilderSimpleExpressions(clazz, baseDir, fqn, fileSimpleExpressions);
                 if (duplicateRouteId) {
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/RouteBuilderParser.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/RouteBuilderParser.java
index c583f6570c0..d3fceef50dc 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/RouteBuilderParser.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/RouteBuilderParser.java
@@ -111,15 +111,15 @@ public final class RouteBuilderParser {
             // is the field annotated with a Camel endpoint
             String uri = null;
             Expression exp = null;
-            for (Annotation ann : field.getAnnotations()) {
+            for (Annotation<JavaClassSource> ann : field.getAnnotations()) {
                 boolean valid = "org.apache.camel.EndpointInject".equals(ann.getQualifiedName())
                         || "org.apache.camel.cdi.Uri".equals(ann.getQualifiedName());
                 if (valid) {
                     exp = (Expression) ann.getInternal();
-                    if (exp instanceof SingleMemberAnnotation) {
-                        exp = ((SingleMemberAnnotation) exp).getValue();
-                    } else if (exp instanceof NormalAnnotation) {
-                        List values = ((NormalAnnotation) exp).values();
+                    if (exp instanceof SingleMemberAnnotation singleMemberAnnotation) {
+                        exp = singleMemberAnnotation.getValue();
+                    } else if (exp instanceof NormalAnnotation normalAnnotation) {
+                        List<?> values = normalAnnotation.values();
                         for (Object value : values) {
                             MemberValuePair pair = (MemberValuePair) value;
                             if ("uri".equals(pair.getName().toString())) {
@@ -150,9 +150,9 @@ public final class RouteBuilderParser {
                 Object internal = exp != null ? exp : field.getInternal();
 
                 // find position of field/expression
-                if (internal instanceof ASTNode) {
-                    int pos = ((ASTNode) internal).getStartPosition();
-                    int len = ((ASTNode) internal).getLength();
+                if (internal instanceof ASTNode astNode) {
+                    int pos = astNode.getStartPosition();
+                    int len = astNode.getLength();
                     int line = findLineNumber(clazz.toUnformattedString(), pos);
                     if (line > -1) {
                         detail.setLineNumber(Integer.toString(line));
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
index 200e8d6d4a9..e5b49996521 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
@@ -107,7 +107,7 @@ public final class CamelJavaParserHelper {
     }
 
     private static MethodSource<JavaClassSource> findCreateRouteBuilderMethod(JavaClassSource clazz) {
-        MethodSource method = clazz.getMethod("createRouteBuilder");
+        MethodSource<JavaClassSource> method = clazz.getMethod("createRouteBuilder");
         if (method != null && (method.isPublic() || method.isProtected()) && method.getParameters().isEmpty()) {
             return method;
         }
@@ -120,18 +120,15 @@ public final class CamelJavaParserHelper {
         MethodDeclaration md = (MethodDeclaration) method.getInternal();
         Block block = md.getBody();
         if (block != null) {
-            List statements = block.statements();
+            List<?> statements = block.statements();
             for (Object statement : statements) {
                 Statement stmt = (Statement) statement;
                 Expression exp = null;
-                if (stmt instanceof ReturnStatement) {
-                    ReturnStatement rs = (ReturnStatement) stmt;
+                if (stmt instanceof ReturnStatement rs) {
                     exp = rs.getExpression();
-                } else if (stmt instanceof ExpressionStatement) {
-                    ExpressionStatement es = (ExpressionStatement) stmt;
+                } else if (stmt instanceof ExpressionStatement es) {
                     exp = es.getExpression();
-                    if (exp instanceof MethodInvocation) {
-                        MethodInvocation mi = (MethodInvocation) exp;
+                    if (exp instanceof MethodInvocation mi) {
                         for (Object arg : mi.arguments()) {
                             if (arg instanceof ClassInstanceCreation) {
                                 exp = (Expression) arg;
@@ -140,18 +137,15 @@ public final class CamelJavaParserHelper {
                         }
                     }
                 }
-                if (exp instanceof ClassInstanceCreation) {
-                    ClassInstanceCreation cic = (ClassInstanceCreation) exp;
+                if (exp instanceof ClassInstanceCreation cic) {
                     boolean isRouteBuilder = false;
-                    if (cic.getType() instanceof SimpleType) {
-                        SimpleType st = (SimpleType) cic.getType();
+                    if (cic.getType() instanceof SimpleType st) {
                         isRouteBuilder = "RouteBuilder".equals(st.getName().toString());
                     }
                     if (isRouteBuilder && cic.getAnonymousClassDeclaration() != null) {
-                        List body = cic.getAnonymousClassDeclaration().bodyDeclarations();
+                        List<?> body = cic.getAnonymousClassDeclaration().bodyDeclarations();
                         for (Object line : body) {
-                            if (line instanceof MethodDeclaration) {
-                                MethodDeclaration amd = (MethodDeclaration) line;
+                            if (line instanceof MethodDeclaration amd) {
                                 if ("configure".equals(amd.getName().toString())) {
                                     return new AnonymousMethodSource(clazz, amd);
                                 }
@@ -191,8 +185,7 @@ public final class CamelJavaParserHelper {
             if (block != null) {
                 for (Object statement : md.getBody().statements()) {
                     // must be a method call expression
-                    if (statement instanceof ExpressionStatement) {
-                        ExpressionStatement es = (ExpressionStatement) statement;
+                    if (statement instanceof ExpressionStatement es) {
                         Expression exp = es.getExpression();
 
                         List<ParserResult> uris = new ArrayList<>();
@@ -217,8 +210,7 @@ public final class CamelJavaParserHelper {
         if (exp == null) {
             return;
         }
-        if (exp instanceof MethodInvocation) {
-            MethodInvocation mi = (MethodInvocation) exp;
+        if (exp instanceof MethodInvocation mi) {
             doParseCamelUris(clazz, block, mi, uris, consumers, producers, strings, fields, routeIdsOnly);
             // if the method was called on another method, then recursive
             exp = mi.getExpression();
@@ -234,7 +226,7 @@ public final class CamelJavaParserHelper {
         if (routeIdsOnly) {
             // include route id for consumers
             if ("routeId".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 if (args != null) {
                     for (Object arg : args) {
                         if (isValidArgument(arg)) {
@@ -254,7 +246,7 @@ public final class CamelJavaParserHelper {
 
         if (consumers) {
             if ("from".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 if (args != null) {
                     for (Object arg : args) {
                         if (isValidArgument(arg)) {
@@ -264,7 +256,7 @@ public final class CamelJavaParserHelper {
                 }
             }
             if ("fromF".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 // the first argument is where the uri is
                 if (args != null && !args.isEmpty()) {
                     Object arg = args.get(0);
@@ -274,7 +266,7 @@ public final class CamelJavaParserHelper {
                 }
             }
             if ("interceptFrom".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 // the first argument is where the uri is
                 if (args != null && !args.isEmpty()) {
                     Object arg = args.get(0);
@@ -284,7 +276,7 @@ public final class CamelJavaParserHelper {
                 }
             }
             if ("pollEnrich".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 // the first argument is where the uri is
                 if (args != null && !args.isEmpty()) {
                     Object arg = args.get(0);
@@ -297,7 +289,7 @@ public final class CamelJavaParserHelper {
 
         if (producers) {
             if ("to".equals(name) || "toD".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 if (args != null) {
                     for (Object arg : args) {
                         // skip if the arg is a boolean, ExchangePattern or Iterateable, type
@@ -308,7 +300,7 @@ public final class CamelJavaParserHelper {
                 }
             }
             if ("toF".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 // the first argument is where the uri is
                 if (args != null && !args.isEmpty()) {
                     Object arg = args.get(0);
@@ -318,7 +310,7 @@ public final class CamelJavaParserHelper {
                 }
             }
             if ("enrich".equals(name) || "wireTap".equals(name)) {
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 // the first argument is where the uri is
                 if (args != null && !args.isEmpty()) {
                     Object arg = args.get(0);
@@ -336,8 +328,7 @@ public final class CamelJavaParserHelper {
             return false;
         }
         // skip ExchangePattern argument
-        if (arg instanceof QualifiedName) {
-            QualifiedName qn = (QualifiedName) arg;
+        if (arg instanceof QualifiedName qn) {
             String name = qn.getFullyQualifiedName();
             if (name.startsWith("ExchangePattern")) {
                 return false;
@@ -367,10 +358,10 @@ public final class CamelJavaParserHelper {
             }
         }
         if (fields && arg instanceof SimpleName) {
-            FieldSource field = getField(clazz, block, (SimpleName) arg);
+            FieldSource<JavaClassSource> field = getField(clazz, block, (SimpleName) arg);
             if (field != null) {
                 // find the endpoint uri from the annotation
-                AnnotationSource annotation = field.getAnnotation("org.apache.camel.cdi.Uri");
+                AnnotationSource<JavaClassSource> annotation = field.getAnnotation("org.apache.camel.cdi.Uri");
                 if (annotation == null) {
                     annotation = field.getAnnotation("org.apache.camel.EndpointInject");
                 }
@@ -405,10 +396,10 @@ public final class CamelJavaParserHelper {
 
     private static Expression extractExpression(Object annotation) {
         Expression exp = (Expression) annotation;
-        if (exp instanceof SingleMemberAnnotation) {
-            exp = ((SingleMemberAnnotation) exp).getValue();
-        } else if (exp instanceof NormalAnnotation) {
-            List values = ((NormalAnnotation) exp).values();
+        if (exp instanceof SingleMemberAnnotation singleMemberAnnotation) {
+            exp = singleMemberAnnotation.getValue();
+        } else if (exp instanceof NormalAnnotation normalAnnotation) {
+            List<?> values = normalAnnotation.values();
             for (Object value : values) {
                 MemberValuePair pair = (MemberValuePair) value;
                 if ("uri".equals(pair.getName().toString())) {
@@ -428,8 +419,7 @@ public final class CamelJavaParserHelper {
         if (block != null) {
             for (Object statement : block.statements()) {
                 // must be a method call expression
-                if (statement instanceof ExpressionStatement) {
-                    ExpressionStatement es = (ExpressionStatement) statement;
+                if (statement instanceof ExpressionStatement es) {
                     Expression exp = es.getExpression();
 
                     List<ParserResult> expressions = new ArrayList<>();
@@ -451,8 +441,7 @@ public final class CamelJavaParserHelper {
         if (exp == null) {
             return;
         }
-        if (exp instanceof MethodInvocation) {
-            MethodInvocation mi = (MethodInvocation) exp;
+        if (exp instanceof MethodInvocation mi) {
             doParseCamelLanguage(node, clazz, block, mi, expressions, language);
             // if the method was called on another method, then recursive
             exp = mi.getExpression();
@@ -466,7 +455,7 @@ public final class CamelJavaParserHelper {
         String name = mi.getName().getIdentifier();
 
         if (language.equals(name)) {
-            List args = mi.arguments();
+            List<?> args = mi.arguments();
             // the first argument is a string parameter for the language expression
             if (args != null && !args.isEmpty()) {
                 // it is a String type
@@ -477,8 +466,8 @@ public final class CamelJavaParserHelper {
                     boolean predicate = false;
                     Expression parent = mi.getExpression();
                     if (parent == null) {
-                        // maybe its an argument
-                        List list = mi.arguments();
+                        // maybe it's an argument
+                        List<?> list = mi.arguments();
                         // must be a single argument
                         if (list != null && list.size() == 1) {
                             ASTNode o = (ASTNode) list.get(0);
@@ -492,8 +481,7 @@ public final class CamelJavaParserHelper {
                             }
                         }
                     }
-                    if (parent instanceof MethodInvocation) {
-                        MethodInvocation emi = (MethodInvocation) parent;
+                    if (parent instanceof MethodInvocation emi) {
                         String parentName = emi.getName().getIdentifier();
                         predicate = isLanguagePredicate(parentName);
                     }
@@ -508,11 +496,10 @@ public final class CamelJavaParserHelper {
         }
 
         // the language maybe be passed in as an argument
-        List args = mi.arguments();
+        List<?> args = mi.arguments();
         if (args != null) {
             for (Object arg : args) {
-                if (arg instanceof MethodInvocation) {
-                    MethodInvocation ami = (MethodInvocation) arg;
+                if (arg instanceof MethodInvocation ami) {
                     doParseCamelLanguage(node, clazz, block, ami, expressions, language);
                 }
             }
@@ -538,12 +525,11 @@ public final class CamelJavaParserHelper {
         return false;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> getField(JavaClassSource clazz, Block block, SimpleName ref) {
         String fieldName = ref.getIdentifier();
         if (fieldName != null) {
             // find field in class
-            FieldSource field = clazz != null ? clazz.getField(fieldName) : null;
+            FieldSource<JavaClassSource> field = clazz != null ? clazz.getField(fieldName) : null;
             if (field == null) {
                 field = findFieldInBlock(clazz, block, fieldName);
             }
@@ -552,38 +538,34 @@ public final class CamelJavaParserHelper {
         return null;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> findFieldInBlock(JavaClassSource clazz, Block block, String fieldName) {
         for (Object statement : block.statements()) {
             // try local statements first in the block
-            if (statement instanceof VariableDeclarationStatement) {
-                final Type type = ((VariableDeclarationStatement) statement).getType();
-                for (Object obj : ((VariableDeclarationStatement) statement).fragments()) {
-                    if (obj instanceof VariableDeclarationFragment) {
-                        VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+            if (statement instanceof VariableDeclarationStatement variableDeclarationStatement) {
+                final Type type = variableDeclarationStatement.getType();
+                for (Object obj : variableDeclarationStatement.fragments()) {
+                    if (obj instanceof VariableDeclarationFragment fragment) {
                         SimpleName name = fragment.getName();
                         if (name != null && fieldName.equals(name.getIdentifier())) {
-                            return new StatementFieldSource(clazz, fragment, type);
+                            return new StatementFieldSource<>(clazz, fragment, type);
                         }
                     }
                 }
             }
 
-            // okay the field may be burried inside an anonymous inner class as a field declaration
+            // okay the field may be buried inside an anonymous inner class as a field declaration
             // outside the configure method, so lets go back to the parent and see what we can find
             ASTNode node = block.getParent();
             if (node instanceof MethodDeclaration) {
                 node = node.getParent();
             }
             if (node instanceof AnonymousClassDeclaration) {
-                List declarations = ((AnonymousClassDeclaration) node).bodyDeclarations();
+                List<?> declarations = ((AnonymousClassDeclaration) node).bodyDeclarations();
                 for (Object dec : declarations) {
-                    if (dec instanceof FieldDeclaration) {
-                        FieldDeclaration fd = (FieldDeclaration) dec;
+                    if (dec instanceof FieldDeclaration fd) {
                         final Type type = fd.getType();
                         for (Object obj : fd.fragments()) {
-                            if (obj instanceof VariableDeclarationFragment) {
-                                VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+                            if (obj instanceof VariableDeclarationFragment fragment) {
                                 SimpleName name = fragment.getName();
                                 if (name != null && fieldName.equals(name.getIdentifier())) {
                                     return new StatementFieldSource(clazz, fragment, type);
@@ -603,25 +585,24 @@ public final class CamelJavaParserHelper {
             expression = ((ParenthesizedExpression) expression).getExpression();
         }
 
-        if (expression instanceof StringLiteral) {
-            return ((StringLiteral) expression).getLiteralValue();
-        } else if (expression instanceof BooleanLiteral) {
-            return String.valueOf(((BooleanLiteral) expression).booleanValue());
-        } else if (expression instanceof NumberLiteral) {
-            return ((NumberLiteral) expression).getToken();
+        if (expression instanceof StringLiteral stringLiteral) {
+            return stringLiteral.getLiteralValue();
+        } else if (expression instanceof BooleanLiteral booleanLiteral) {
+            return String.valueOf(booleanLiteral.booleanValue());
+        } else if (expression instanceof NumberLiteral numberLiteral) {
+            return numberLiteral.getToken();
         }
 
-        // if it a method invocation then add a dummy value assuming the method invocation will return a valid response
-        if (expression instanceof MethodInvocation) {
-            String name = ((MethodInvocation) expression).getName().getIdentifier();
+        // if it's a method invocation then add a dummy value assuming the method invocation will return a valid response
+        if (expression instanceof MethodInvocation methodInvocation) {
+            String name = methodInvocation.getName().getIdentifier();
             return "{{" + name + "}}";
         }
 
-        // if its a qualified name (usually a constant field in another class)
+        // if it's a qualified name (usually a constant field in another class)
         // then add a dummy value as we cannot find the field value in other classes and maybe even outside the
         // source code we have access to
-        if (expression instanceof QualifiedName) {
-            QualifiedName qn = (QualifiedName) expression;
+        if (expression instanceof QualifiedName qn) {
             String name = qn.getFullyQualifiedName();
             return "{{" + name + "}}";
         }
@@ -631,7 +612,7 @@ public final class CamelJavaParserHelper {
             if (field != null) {
                 // is the field annotated with a Camel endpoint
                 if (field.getAnnotations() != null) {
-                    for (Annotation ann : field.getAnnotations()) {
+                    for (Annotation<JavaClassSource> ann : field.getAnnotations()) {
                         boolean valid = "org.apache.camel.EndpointInject".equals(ann.getQualifiedName())
                                 || "org.apache.camel.cdi.Uri".equals(ann.getQualifiedName());
                         if (valid) {
@@ -647,9 +628,8 @@ public final class CamelJavaParserHelper {
                     // then grab the uri from the first argument
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
-                    if (expression instanceof MethodInvocation) {
-                        MethodInvocation mi = (MethodInvocation) expression;
-                        List args = mi.arguments();
+                    if (expression instanceof MethodInvocation mi) {
+                        List<?> args = mi.arguments();
                         if (args != null && !args.isEmpty()) {
                             // the first argument has the endpoint uri
                             expression = (Expression) args.get(0);
@@ -661,7 +641,7 @@ public final class CamelJavaParserHelper {
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
                     if (expression == null) {
-                        // its a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
+                        // it's a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
                         return "{{" + field.getName() + "}}";
                     } else {
                         return getLiteralValue(clazz, block, expression);
@@ -672,10 +652,9 @@ public final class CamelJavaParserHelper {
                 final String fieldName = ((SimpleName) expression).getIdentifier();
                 return "{{" + fieldName + "}}";
             }
-        } else if (expression instanceof InfixExpression) {
+        } else if (expression instanceof InfixExpression ie) {
             String answer = null;
             // is it a string that is concat together?
-            InfixExpression ie = (InfixExpression) expression;
             if (InfixExpression.Operator.PLUS.equals(ie.getOperator())) {
 
                 String val1 = getLiteralValue(clazz, block, ie.getLeftOperand());
@@ -694,7 +673,7 @@ public final class CamelJavaParserHelper {
 
                 if (!answer.isEmpty()) {
                     // include extended when we concat on 2 or more lines
-                    List extended = ie.extendedOperands();
+                    List<?> extended = ie.extendedOperands();
                     if (extended != null) {
                         StringBuilder answerBuilder = new StringBuilder(answer);
                         for (Object ext : extended) {
@@ -721,7 +700,7 @@ public final class CamelJavaParserHelper {
         if (expression instanceof NumberLiteral) {
             return true;
         } else if (expression instanceof SimpleName) {
-            FieldSource field = getField(clazz, block, (SimpleName) expression);
+            FieldSource<JavaClassSource> field = getField(clazz, block, (SimpleName) expression);
             if (field != null) {
                 return field.getType().isType("int") || field.getType().isType("long")
                         || field.getType().isType("Integer") || field.getType().isType("Long");
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
index d788ab3c37f..8a821682cc4 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java
@@ -71,8 +71,7 @@ public final class CamelJavaRestDslParserHelper {
             if (block != null) {
                 for (Object statement : md.getBody().statements()) {
                     // must be a method call expression
-                    if (statement instanceof ExpressionStatement) {
-                        ExpressionStatement es = (ExpressionStatement) statement;
+                    if (statement instanceof ExpressionStatement es) {
                         Expression exp = es.getExpression();
                         boolean valid = isRestConfiguration(exp);
                         if (valid) {
@@ -116,8 +115,7 @@ public final class CamelJavaRestDslParserHelper {
             if (block != null) {
                 for (Object statement : md.getBody().statements()) {
                     // must be a method call expression
-                    if (statement instanceof ExpressionStatement) {
-                        ExpressionStatement es = (ExpressionStatement) statement;
+                    if (statement instanceof ExpressionStatement es) {
                         Expression exp = es.getExpression();
                         boolean valid = isRest(exp);
                         if (valid) {
@@ -164,10 +162,10 @@ public final class CamelJavaRestDslParserHelper {
     private String findRootMethodName(Expression exp) {
         String rootMethodName = null;
 
-        // find out if this is from a Camel route (eg from, route etc.)
+        // find out if this is from a Camel route (e.g. from, route etc.)
         Expression sub = exp;
-        while (sub instanceof MethodInvocation) {
-            sub = ((MethodInvocation) sub).getExpression();
+        while (sub instanceof MethodInvocation methodInvocation) {
+            sub = methodInvocation.getExpression();
             if (sub instanceof MethodInvocation) {
                 Expression parent = ((MethodInvocation) sub).getExpression();
                 if (parent == null) {
@@ -175,10 +173,10 @@ public final class CamelJavaRestDslParserHelper {
                 }
             }
         }
-        if (sub instanceof MethodInvocation) {
-            rootMethodName = ((MethodInvocation) sub).getName().getIdentifier();
-        } else if (sub instanceof SimpleName) {
-            rootMethodName = ((SimpleName) sub).getIdentifier();
+        if (sub instanceof MethodInvocation methodInvocation) {
+            rootMethodName = methodInvocation.getName().getIdentifier();
+        } else if (sub instanceof SimpleName simpleName) {
+            rootMethodName = simpleName.getIdentifier();
         }
         return rootMethodName;
     }
@@ -197,8 +195,7 @@ public final class CamelJavaRestDslParserHelper {
         if (exp == null) {
             return;
         }
-        if (exp instanceof MethodInvocation) {
-            MethodInvocation mi = (MethodInvocation) exp;
+        if (exp instanceof MethodInvocation mi) {
             doParseRestConfiguration(node, fullyQualifiedFileName, clazz, block, mi);
             // if the method was called on another method, then recursive
             exp = mi.getExpression();
@@ -212,7 +209,7 @@ public final class CamelJavaRestDslParserHelper {
             Expression exp) {
         if (exp == null) {
             // this rest service is not complete, if there is any details on verb then they are actually general
-            // for this rest service and we should pass the details to it
+            // for this rest service, and we should pass the details to it
             if (verb != null) {
                 node.setConsumes(verb.getConsumes());
                 node.setProduces(verb.getProduces());
@@ -223,8 +220,7 @@ public final class CamelJavaRestDslParserHelper {
             }
             return;
         }
-        if (exp instanceof MethodInvocation) {
-            MethodInvocation mi = (MethodInvocation) exp;
+        if (exp instanceof MethodInvocation mi) {
             verb = doParseRestService(node, verb, fullyQualifiedFileName, clazz, block, mi);
             // if the method was called on another method, then recursive
             exp = mi.getExpression();
@@ -424,7 +420,7 @@ public final class CamelJavaRestDslParserHelper {
     }
 
     private static String extractValueFromFirstArgument(JavaClassSource clazz, Block block, MethodInvocation mi) {
-        List args = mi.arguments();
+        List<?> args = mi.arguments();
         if (args != null && !args.isEmpty()) {
             Expression exp = (Expression) args.get(0);
             return getLiteralValue(clazz, block, exp);
@@ -433,7 +429,7 @@ public final class CamelJavaRestDslParserHelper {
     }
 
     private static String extractValueFromSecondArgument(JavaClassSource clazz, Block block, MethodInvocation mi) {
-        List args = mi.arguments();
+        List<?> args = mi.arguments();
         if (args != null && args.size() > 1) {
             Expression exp = (Expression) args.get(1);
             return getLiteralValue(clazz, block, exp);
@@ -441,12 +437,11 @@ public final class CamelJavaRestDslParserHelper {
         return null;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> getField(JavaClassSource clazz, Block block, SimpleName ref) {
         String fieldName = ref.getIdentifier();
         if (fieldName != null) {
             // find field in class
-            FieldSource field = clazz != null ? clazz.getField(fieldName) : null;
+            FieldSource<JavaClassSource> field = clazz != null ? clazz.getField(fieldName) : null;
             if (field == null) {
                 field = findFieldInBlock(clazz, block, fieldName);
             }
@@ -455,41 +450,37 @@ public final class CamelJavaRestDslParserHelper {
         return null;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> findFieldInBlock(JavaClassSource clazz, Block block, String fieldName) {
         for (Object statement : block.statements()) {
             // try local statements first in the block
             if (statement instanceof VariableDeclarationStatement) {
                 final Type type = ((VariableDeclarationStatement) statement).getType();
                 for (Object obj : ((VariableDeclarationStatement) statement).fragments()) {
-                    if (obj instanceof VariableDeclarationFragment) {
-                        VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+                    if (obj instanceof VariableDeclarationFragment fragment) {
                         SimpleName name = fragment.getName();
                         if (name != null && fieldName.equals(name.getIdentifier())) {
-                            return new StatementFieldSource(clazz, fragment, type);
+                            return new StatementFieldSource<>(clazz, fragment, type);
                         }
                     }
                 }
             }
 
-            // okay the field may be burried inside an anonymous inner class as a field declaration
+            // okay the field may be buried inside an anonymous inner class as a field declaration
             // outside the configure method, so lets go back to the parent and see what we can find
             ASTNode node = block.getParent();
             if (node instanceof MethodDeclaration) {
                 node = node.getParent();
             }
-            if (node instanceof AnonymousClassDeclaration) {
-                List declarations = ((AnonymousClassDeclaration) node).bodyDeclarations();
+            if (node instanceof AnonymousClassDeclaration anonymousClassDeclaration) {
+                List<?> declarations = anonymousClassDeclaration.bodyDeclarations();
                 for (Object dec : declarations) {
-                    if (dec instanceof FieldDeclaration) {
-                        FieldDeclaration fd = (FieldDeclaration) dec;
+                    if (dec instanceof FieldDeclaration fd) {
                         final Type type = fd.getType();
                         for (Object obj : fd.fragments()) {
-                            if (obj instanceof VariableDeclarationFragment) {
-                                VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+                            if (obj instanceof VariableDeclarationFragment fragment) {
                                 SimpleName name = fragment.getName();
                                 if (name != null && fieldName.equals(name.getIdentifier())) {
-                                    return new StatementFieldSource(clazz, fragment, type);
+                                    return new StatementFieldSource<>(clazz, fragment, type);
                                 }
                             }
                         }
@@ -514,15 +505,14 @@ public final class CamelJavaRestDslParserHelper {
             return ((NumberLiteral) expression).getToken();
         }
 
-        // if it a method invocation then add a dummy value assuming the method invocation will return a valid response
-        if (expression instanceof MethodInvocation) {
-            String name = ((MethodInvocation) expression).getName().getIdentifier();
+        // if it's a method invocation then add a dummy value assuming the method invocation will return a valid response
+        if (expression instanceof MethodInvocation methodInvocation) {
+            String name = methodInvocation.getName().getIdentifier();
             return "{{" + name + "}}";
         }
 
-        // if its a qualified name, then its an enum where we should grab the simple name
-        if (expression instanceof QualifiedName) {
-            QualifiedName qn = (QualifiedName) expression;
+        // if it's a qualified name, then its an enum where we should grab the simple name
+        if (expression instanceof QualifiedName qn) {
             return qn.getName().getIdentifier();
         }
 
@@ -531,15 +521,15 @@ public final class CamelJavaRestDslParserHelper {
             if (field != null) {
                 // is the field annotated with a Camel endpoint
                 if (field.getAnnotations() != null) {
-                    for (Annotation ann : field.getAnnotations()) {
+                    for (Annotation<JavaClassSource> ann : field.getAnnotations()) {
                         boolean valid = "org.apache.camel.EndpointInject".equals(ann.getQualifiedName())
                                 || "org.apache.camel.cdi.Uri".equals(ann.getQualifiedName());
                         if (valid) {
                             Expression exp = (Expression) ann.getInternal();
-                            if (exp instanceof SingleMemberAnnotation) {
-                                exp = ((SingleMemberAnnotation) exp).getValue();
-                            } else if (exp instanceof NormalAnnotation) {
-                                List values = ((NormalAnnotation) exp).values();
+                            if (exp instanceof SingleMemberAnnotation singleMemberAnnotation) {
+                                exp = singleMemberAnnotation.getValue();
+                            } else if (exp instanceof NormalAnnotation normalAnnotation) {
+                                List<?> values = normalAnnotation.values();
                                 for (Object value : values) {
                                     MemberValuePair pair = (MemberValuePair) value;
                                     if ("uri".equals(pair.getName().toString())) {
@@ -559,9 +549,8 @@ public final class CamelJavaRestDslParserHelper {
                     // then grab the uri from the first argument
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
-                    if (expression instanceof MethodInvocation) {
-                        MethodInvocation mi = (MethodInvocation) expression;
-                        List args = mi.arguments();
+                    if (expression instanceof MethodInvocation mi) {
+                        List<?> args = mi.arguments();
                         if (args != null && !args.isEmpty()) {
                             // the first argument has the endpoint uri
                             expression = (Expression) args.get(0);
@@ -573,7 +562,7 @@ public final class CamelJavaRestDslParserHelper {
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
                     if (expression == null) {
-                        // its a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
+                        // it's a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
                         return "{{" + field.getName() + "}}";
                     } else {
                         return getLiteralValue(clazz, block, expression);
@@ -584,10 +573,9 @@ public final class CamelJavaRestDslParserHelper {
                 final String fieldName = ((SimpleName) expression).getIdentifier();
                 return "{{" + fieldName + "}}";
             }
-        } else if (expression instanceof InfixExpression) {
+        } else if (expression instanceof InfixExpression ie) {
             String answer = null;
             // is it a string that is concat together?
-            InfixExpression ie = (InfixExpression) expression;
             if (InfixExpression.Operator.PLUS.equals(ie.getOperator())) {
 
                 String val1 = getLiteralValue(clazz, block, ie.getLeftOperand());
@@ -606,7 +594,7 @@ public final class CamelJavaRestDslParserHelper {
 
                 if (!answer.isEmpty()) {
                     // include extended when we concat on 2 or more lines
-                    List extended = ie.extendedOperands();
+                    List<?> extended = ie.extendedOperands();
                     if (extended != null) {
                         StringBuilder answerBuilder = new StringBuilder(answer);
                         for (Object ext : extended) {
@@ -633,7 +621,7 @@ public final class CamelJavaRestDslParserHelper {
         if (expression instanceof NumberLiteral) {
             return true;
         } else if (expression instanceof SimpleName) {
-            FieldSource field = getField(clazz, block, (SimpleName) expression);
+            FieldSource<JavaClassSource> field = getField(clazz, block, (SimpleName) expression);
             if (field != null) {
                 return field.getType().isType("int") || field.getType().isType("long")
                         || field.getType().isType("Integer") || field.getType().isType("Long");
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
index 1c90bf5f3ce..77beae5fd7f 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaTreeParserHelper.java
@@ -79,8 +79,7 @@ public final class CamelJavaTreeParserHelper {
             if (block != null) {
                 for (Object statement : md.getBody().statements()) {
                     // must be a method call expression
-                    if (statement instanceof ExpressionStatement) {
-                        ExpressionStatement es = (ExpressionStatement) statement;
+                    if (statement instanceof ExpressionStatement es) {
                         Expression exp = es.getExpression();
                         boolean valid = isFromCamelRoute(exp);
                         if (valid) {
@@ -177,12 +176,12 @@ public final class CamelJavaTreeParserHelper {
                 }
             }
         }
-        if (sub instanceof MethodInvocation) {
-            rootMethodName = ((MethodInvocation) sub).getName().getIdentifier();
-        } else if (sub instanceof SimpleName) {
-            rootMethodName = ((SimpleName) sub).getIdentifier();
-        } else if (sub == null && exp instanceof MethodInvocation) {
-            rootMethodName = ((MethodInvocation) exp).getName().getIdentifier();
+        if (sub instanceof MethodInvocation methodInvocation) {
+            rootMethodName = methodInvocation.getName().getIdentifier();
+        } else if (sub instanceof SimpleName simpleName) {
+            rootMethodName = simpleName.getIdentifier();
+        } else if (sub == null && exp instanceof MethodInvocation methodInvocation) {
+            rootMethodName = methodInvocation.getName().getIdentifier();
         }
         // a route starts either via from or route
         return "from".equals(rootMethodName) || "route".equals(rootMethodName);
@@ -216,8 +215,7 @@ public final class CamelJavaTreeParserHelper {
         if (exp == null) {
             return;
         }
-        if (exp instanceof MethodInvocation) {
-            MethodInvocation mi = (MethodInvocation) exp;
+        if (exp instanceof MethodInvocation mi) {
             node = doParseCamelModels(nodeFactory, fullyQualifiedFileName, clazz, configureMethod, block, mi, node);
             // if the method was called on another method, then recursive
             exp = mi.getExpression();
@@ -259,7 +257,7 @@ public final class CamelJavaTreeParserHelper {
 
             if ("routeId".equals(name)) {
                 // grab the route id
-                List args = mi.arguments();
+                List<?> args = mi.arguments();
                 if (args != null && !args.isEmpty()) {
                     // the first argument has the route id
                     Expression exp = (Expression) args.get(0);
@@ -277,12 +275,11 @@ public final class CamelJavaTreeParserHelper {
         return node;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> getField(JavaClassSource clazz, Block block, SimpleName ref) {
         String fieldName = ref.getIdentifier();
         if (fieldName != null) {
             // find field in class
-            FieldSource field = clazz != null ? clazz.getField(fieldName) : null;
+            FieldSource<JavaClassSource> field = clazz != null ? clazz.getField(fieldName) : null;
             if (field == null) {
                 field = findFieldInBlock(clazz, block, fieldName);
             }
@@ -291,41 +288,37 @@ public final class CamelJavaTreeParserHelper {
         return null;
     }
 
-    @SuppressWarnings("unchecked")
     private static FieldSource<JavaClassSource> findFieldInBlock(JavaClassSource clazz, Block block, String fieldName) {
         for (Object statement : block.statements()) {
             // try local statements first in the block
             if (statement instanceof VariableDeclarationStatement) {
                 final Type type = ((VariableDeclarationStatement) statement).getType();
                 for (Object obj : ((VariableDeclarationStatement) statement).fragments()) {
-                    if (obj instanceof VariableDeclarationFragment) {
-                        VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+                    if (obj instanceof VariableDeclarationFragment fragment) {
                         SimpleName name = fragment.getName();
                         if (name != null && fieldName.equals(name.getIdentifier())) {
-                            return new StatementFieldSource(clazz, fragment, type);
+                            return new StatementFieldSource<>(clazz, fragment, type);
                         }
                     }
                 }
             }
 
-            // okay the field may be burried inside an anonymous inner class as a field declaration
+            // okay the field may be buried inside an anonymous inner class as a field declaration
             // outside the configure method, so lets go back to the parent and see what we can find
             ASTNode node = block.getParent();
             if (node instanceof MethodDeclaration) {
                 node = node.getParent();
             }
             if (node instanceof AnonymousClassDeclaration) {
-                List declarations = ((AnonymousClassDeclaration) node).bodyDeclarations();
+                List<?> declarations = ((AnonymousClassDeclaration) node).bodyDeclarations();
                 for (Object dec : declarations) {
-                    if (dec instanceof FieldDeclaration) {
-                        FieldDeclaration fd = (FieldDeclaration) dec;
+                    if (dec instanceof FieldDeclaration fd) {
                         final Type type = fd.getType();
                         for (Object obj : fd.fragments()) {
-                            if (obj instanceof VariableDeclarationFragment) {
-                                VariableDeclarationFragment fragment = (VariableDeclarationFragment) obj;
+                            if (obj instanceof VariableDeclarationFragment fragment) {
                                 SimpleName name = fragment.getName();
                                 if (name != null && fieldName.equals(name.getIdentifier())) {
-                                    return new StatementFieldSource(clazz, fragment, type);
+                                    return new StatementFieldSource<>(clazz, fragment, type);
                                 }
                             }
                         }
@@ -354,17 +347,16 @@ public final class CamelJavaTreeParserHelper {
             return ((NumberLiteral) expression).getToken();
         }
 
-        // if it a method invocation then add a dummy value assuming the method invocation will return a valid response
+        // if it's a method invocation then add a dummy value assuming the method invocation will return a valid response
         if (expression instanceof MethodInvocation) {
             String name = ((MethodInvocation) expression).getName().getIdentifier();
             return "{{" + name + "}}";
         }
 
-        // if its a qualified name (usually a constant field in another class)
+        // if it's a qualified name (usually a constant field in another class)
         // then add a dummy value as we cannot find the field value in other classes and maybe even outside the
         // source code we have access to
-        if (expression instanceof QualifiedName) {
-            QualifiedName qn = (QualifiedName) expression;
+        if (expression instanceof QualifiedName qn) {
             String name = qn.getFullyQualifiedName();
             return "{{" + name + "}}";
         }
@@ -374,7 +366,7 @@ public final class CamelJavaTreeParserHelper {
             if (field != null) {
                 // is the field annotated with a Camel endpoint
                 if (field.getAnnotations() != null) {
-                    for (Annotation ann : field.getAnnotations()) {
+                    for (Annotation<JavaClassSource> ann : field.getAnnotations()) {
                         boolean valid = "org.apache.camel.EndpointInject".equals(ann.getQualifiedName())
                                 || "org.apache.camel.cdi.Uri".equals(ann.getQualifiedName());
                         if (valid) {
@@ -382,7 +374,7 @@ public final class CamelJavaTreeParserHelper {
                             if (exp instanceof SingleMemberAnnotation) {
                                 exp = ((SingleMemberAnnotation) exp).getValue();
                             } else if (exp instanceof NormalAnnotation) {
-                                List values = ((NormalAnnotation) exp).values();
+                                List<?> values = ((NormalAnnotation) exp).values();
                                 for (Object value : values) {
                                     MemberValuePair pair = (MemberValuePair) value;
                                     if ("uri".equals(pair.getName().toString())) {
@@ -402,9 +394,8 @@ public final class CamelJavaTreeParserHelper {
                     // then grab the uri from the first argument
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
-                    if (expression instanceof MethodInvocation) {
-                        MethodInvocation mi = (MethodInvocation) expression;
-                        List args = mi.arguments();
+                    if (expression instanceof MethodInvocation mi) {
+                        List<?> args = mi.arguments();
                         if (args != null && !args.isEmpty()) {
                             // the first argument has the endpoint uri
                             expression = (Expression) args.get(0);
@@ -416,7 +407,7 @@ public final class CamelJavaTreeParserHelper {
                     VariableDeclarationFragment vdf = (VariableDeclarationFragment) field.getInternal();
                     expression = vdf.getInitializer();
                     if (expression == null) {
-                        // its a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
+                        // it's a field which has no initializer, then add a dummy value assuming the field will be initialized at runtime
                         return "{{" + field.getName() + "}}";
                     } else {
                         return getLiteralValue(clazz, block, expression);
@@ -427,10 +418,9 @@ public final class CamelJavaTreeParserHelper {
                 final String fieldName = ((SimpleName) expression).getIdentifier();
                 return "{{" + fieldName + "}}";
             }
-        } else if (expression instanceof InfixExpression) {
+        } else if (expression instanceof InfixExpression ie) {
             String answer = null;
             // is it a string that is concat together?
-            InfixExpression ie = (InfixExpression) expression;
             if (InfixExpression.Operator.PLUS.equals(ie.getOperator())) {
 
                 String val1 = getLiteralValue(clazz, block, ie.getLeftOperand());
@@ -449,7 +439,7 @@ public final class CamelJavaTreeParserHelper {
 
                 if (!answer.isEmpty()) {
                     // include extended when we concat on 2 or more lines
-                    List extended = ie.extendedOperands();
+                    List<?> extended = ie.extendedOperands();
                     if (extended != null) {
                         StringBuilder answerBuilder = new StringBuilder(answer);
                         for (Object ext : extended) {
@@ -476,7 +466,7 @@ public final class CamelJavaTreeParserHelper {
         if (expression instanceof NumberLiteral) {
             return true;
         } else if (expression instanceof SimpleName) {
-            FieldSource field = getField(clazz, block, (SimpleName) expression);
+            FieldSource<JavaClassSource> field = getField(clazz, block, (SimpleName) expression);
             if (field != null) {
                 return field.getType().isType("int") || field.getType().isType("long")
                         || field.getType().isType("Integer") || field.getType().isType("Long");
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlHelper.java
index c0cebd8e454..e76868fba4f 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlHelper.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlHelper.java
@@ -122,7 +122,7 @@ public final class CamelXmlHelper {
     }
 
     private static void findAllUrisRecursive(Node node, List<Node> nodes) {
-        // okay its a route so grab all uri attributes we can find
+        // okay it's a route so grab all uri attributes we can find
         String url = getSafeAttribute(node, "uri");
         if (url != null) {
             nodes.add(node);
@@ -168,7 +168,7 @@ public final class CamelXmlHelper {
     }
 
     private static void findAllLanguageExpressionsRecursive(Node node, List<Node> nodes, String language) {
-        // okay its a route so grab if its the language
+        // okay it's a route so grab if it's the language
         if (isNodeName(language, node)) {
             nodes.add(node);
         }
@@ -255,8 +255,7 @@ public final class CamelXmlHelper {
 
     private static String getIdOrIndex(Node node, Map<String, Integer> nodeCounts) {
         String answer = null;
-        if (node instanceof Element) {
-            Element element = (Element) node;
+        if (node instanceof Element element) {
             String elementName = element.getTagName();
             if ("routes".equals(elementName)) {
                 elementName = "camelContext";
diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/roaster/StatementFieldSource.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/roaster/StatementFieldSource.java
index b76c2da21fc..76c50a22944 100644
--- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/roaster/StatementFieldSource.java
+++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/roaster/StatementFieldSource.java
@@ -25,60 +25,60 @@ import org.jboss.forge.roaster.model.Visibility;
 import org.jboss.forge.roaster.model.impl.TypeImpl;
 import org.jboss.forge.roaster.model.source.AnnotationSource;
 import org.jboss.forge.roaster.model.source.FieldSource;
-import org.jboss.forge.roaster.model.source.JavaClassSource;
 import org.jboss.forge.roaster.model.source.JavaDocSource;
+import org.jboss.forge.roaster.model.source.JavaSource;
 
-public class StatementFieldSource implements FieldSource {
+public class StatementFieldSource<O extends JavaSource<O>> implements FieldSource<O> {
 
     // this implementation should only implement the needed logic to support the parser
 
-    private final JavaClassSource origin;
+    private final O origin;
     private final Object internal;
-    private final Type type;
+    private final Type<O> type;
 
-    public StatementFieldSource(JavaClassSource origin, Object internal, Object typeInternal) {
+    public StatementFieldSource(O origin, Object internal, Object typeInternal) {
         this.origin = origin;
         this.internal = internal;
-        this.type = new TypeImpl(origin, typeInternal);
+        this.type = new TypeImpl<>(origin, typeInternal);
     }
 
     @Override
-    public FieldSource setType(Class clazz) {
+    public FieldSource<O> setType(Class clazz) {
         return null;
     }
 
     @Override
-    public FieldSource setType(String type) {
+    public FieldSource<O> setType(String type) {
         return null;
     }
 
     @Override
-    public FieldSource setLiteralInitializer(String value) {
+    public FieldSource<O> setLiteralInitializer(String value) {
         return null;
     }
 
     @Override
-    public FieldSource setStringInitializer(String value) {
+    public FieldSource<O> setStringInitializer(String value) {
         return null;
     }
 
     @Override
-    public FieldSource setTransient(boolean value) {
+    public FieldSource<O> setTransient(boolean value) {
         return null;
     }
 
     @Override
-    public FieldSource setVolatile(boolean value) {
+    public FieldSource<O> setVolatile(boolean value) {
         return null;
     }
 
     @Override
-    public FieldSource setType(JavaType entity) {
+    public FieldSource<O> setType(JavaType entity) {
         return null;
     }
 
     @Override
-    public List<AnnotationSource> getAnnotations() {
+    public List<AnnotationSource<O>> getAnnotations() {
         return null;
     }
 
@@ -88,22 +88,22 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public boolean hasAnnotation(Class type) {
+    public boolean hasAnnotation(Class<? extends java.lang.annotation.Annotation> type) {
         return false;
     }
 
     @Override
-    public AnnotationSource getAnnotation(String type) {
+    public AnnotationSource<O> getAnnotation(String type) {
         return null;
     }
 
     @Override
-    public AnnotationSource addAnnotation() {
+    public AnnotationSource<O> addAnnotation() {
         return null;
     }
 
     @Override
-    public AnnotationSource addAnnotation(String className) {
+    public AnnotationSource<O> addAnnotation(String className) {
         return null;
     }
 
@@ -112,22 +112,22 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public Object removeAnnotation(Annotation annotation) {
+    public FieldSource<O> removeAnnotation(Annotation annotation) {
         return null;
     }
 
     @Override
-    public AnnotationSource addAnnotation(Class type) {
+    public AnnotationSource<O> addAnnotation(Class type) {
         return null;
     }
 
     @Override
-    public AnnotationSource getAnnotation(Class type) {
+    public AnnotationSource<O> getAnnotation(Class type) {
         return null;
     }
 
     @Override
-    public Type getType() {
+    public Type<O> getType() {
         return type;
     }
 
@@ -152,7 +152,7 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public Object setFinal(boolean finl) {
+    public FieldSource<O> setFinal(boolean finl) {
         return null;
     }
 
@@ -167,7 +167,7 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public JavaDocSource getJavaDoc() {
+    public JavaDocSource<FieldSource<O>> getJavaDoc() {
         return null;
     }
 
@@ -177,12 +177,12 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public Object removeJavaDoc() {
+    public FieldSource<O> removeJavaDoc() {
         return null;
     }
 
     @Override
-    public Object setName(String name) {
+    public FieldSource<O> setName(String name) {
         return null;
     }
 
@@ -192,12 +192,12 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public Object getOrigin() {
+    public O getOrigin() {
         return origin;
     }
 
     @Override
-    public Object setStatic(boolean value) {
+    public FieldSource<O> setStatic(boolean value) {
         return null;
     }
 
@@ -207,27 +207,27 @@ public class StatementFieldSource implements FieldSource {
     }
 
     @Override
-    public Object setPackagePrivate() {
+    public FieldSource<O> setPackagePrivate() {
         return null;
     }
 
     @Override
-    public Object setPublic() {
+    public FieldSource<O> setPublic() {
         return null;
     }
 
     @Override
-    public Object setPrivate() {
+    public FieldSource<O> setPrivate() {
         return null;
     }
 
     @Override
-    public Object setProtected() {
+    public FieldSource<O> setProtected() {
         return null;
     }
 
     @Override
-    public Object setVisibility(Visibility scope) {
+    public FieldSource<O> setVisibility(Visibility scope) {
         return null;
     }
 
diff --git a/components/camel-activemq/src/generated/resources/org/apache/camel/component/activemq/activemq.json b/components/camel-activemq/src/generated/resources/org/apache/camel/component/activemq/activemq.json
index 4e2e512fe8c..a4105c2bcb9 100644
--- a/components/camel-activemq/src/generated/resources/org/apache/camel/component/activemq/activemq.json
+++ b/components/camel-activemq/src/generated/resources/org/apache/camel/component/activemq/activemq.json
@@ -30,8 +30,8 @@
     "jmsMessageType": { "index": 5, "kind": "property", "displayName": "Jms Message Type", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.jms.JmsMessageType", "enum": [ "Bytes", "Map", "Object", "Stream", "Text" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Allows you to force the use o [...]
     "replyTo": { "index": 6, "kind": "property", "displayName": "Reply To", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Provides an explicit ReplyTo destination (overrides any incoming value of Message.getJMSReplyTo() in consumer)." },
     "testConnectionOnStartup": { "index": 7, "kind": "property", "displayName": "Test Connection On Startup", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Specifies whether to test the connection on startup. This ensures that when Came [...]
-    "usePooledConnection": { "index": 8, "kind": "property", "displayName": "Use Pooled Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "description": "Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be use [...]
-    "useSingleConnection": { "index": 9, "kind": "property", "displayName": "Use Single Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Enables or disables whether a Spring SingleConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling wil [...]
+    "usePooledConnection": { "index": 8, "kind": "property", "displayName": "Use Pooled Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": true, "description": "Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will be used r [...]
+    "useSingleConnection": { "index": 9, "kind": "property", "displayName": "Use Single Connection", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Enables or disables whether a Spring SingleConnectionFactory will be used so that when messages are sent to ActiveMQ from outside a message consuming thread, pooling will b [...]
     "acknowledgementModeName": { "index": 10, "kind": "property", "displayName": "Acknowledgement Mode Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "SESSION_TRANSACTED", "CLIENT_ACKNOWLEDGE", "AUTO_ACKNOWLEDGE", "DUPS_OK_ACKNOWLEDGE" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "AUTO_ACKNOWLEDGE", "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "conf [...]
     "artemisConsumerPriority": { "index": 11, "kind": "property", "displayName": "Artemis Consumer Priority", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Consumer priorities allow you to ensure that high priority consumers receive messages while they  [...]
     "asyncConsumer": { "index": 12, "kind": "property", "displayName": "Async Consumer", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.jms.JmsConfiguration", "configurationField": "configuration", "description": "Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsu [...]
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
index 322ae1d6317..435f07aae0e 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
@@ -80,8 +80,8 @@ public class ActiveMQComponent extends JmsComponent {
     }
 
     public String getBrokerURL() {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            return ((ActiveMQConfiguration) getConfiguration()).getBrokerURL();
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            return activeMQConfiguration.getBrokerURL();
         }
         return null;
     }
@@ -92,8 +92,8 @@ public class ActiveMQComponent extends JmsComponent {
      */
     @Metadata(label = "common")
     public void setBrokerURL(String brokerURL) {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) getConfiguration()).setBrokerURL(brokerURL);
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            activeMQConfiguration.setBrokerURL(brokerURL);
         }
     }
 
@@ -104,21 +104,21 @@ public class ActiveMQComponent extends JmsComponent {
      */
     @Metadata(defaultValue = "false", label = "advanced")
     public void setTrustAllPackages(boolean trustAllPackages) {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) getConfiguration()).setTrustAllPackages(trustAllPackages);
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            activeMQConfiguration.setTrustAllPackages(trustAllPackages);
         }
     }
 
     public boolean isTrustAllPackages() {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            return ((ActiveMQConfiguration) getConfiguration()).isTrustAllPackages();
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            return activeMQConfiguration.isTrustAllPackages();
         }
         return false;
     }
 
     /**
      * Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ
-     * from outside of a message consuming thread, pooling will be used rather than the default with the Spring
+     * from outside a message consuming thread, pooling will be used rather than the default with the Spring
      * {@link JmsTemplate} which will create a new connection, session, producer for each message then close them all
      * down again.
      * <p/>
@@ -126,36 +126,36 @@ public class ActiveMQComponent extends JmsComponent {
      */
     @Metadata(defaultValue = "true", label = "common")
     public void setUsePooledConnection(boolean usePooledConnection) {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) getConfiguration()).setUsePooledConnection(usePooledConnection);
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            activeMQConfiguration.setUsePooledConnection(usePooledConnection);
         }
     }
 
     public boolean isUsePooledConnection() {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            return ((ActiveMQConfiguration) getConfiguration()).isUsePooledConnection();
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            return activeMQConfiguration.isUsePooledConnection();
         }
         return true;
     }
 
     /**
      * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when messages are sent
-     * to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the
-     * Spring {@link JmsTemplate} which will create a new connection, session, producer for each message then close them
-     * all down again.
+     * to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the Spring
+     * {@link JmsTemplate} which will create a new connection, session, producer for each message then close them all
+     * down again.
      * <p/>
      * The default value is false and a pooled connection is used by default.
      */
     @Metadata(defaultValue = "false", label = "common")
     public void setUseSingleConnection(boolean useSingleConnection) {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) getConfiguration()).setUseSingleConnection(useSingleConnection);
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            activeMQConfiguration.setUseSingleConnection(useSingleConnection);
         }
     }
 
     public boolean isUseSingleConnection() {
-        if (getConfiguration() instanceof ActiveMQConfiguration) {
-            return ((ActiveMQConfiguration) getConfiguration()).isUseSingleConnection();
+        if (getConfiguration() instanceof ActiveMQConfiguration activeMQConfiguration) {
+            return activeMQConfiguration.isUseSingleConnection();
         }
         return false;
     }
@@ -186,11 +186,10 @@ public class ActiveMQComponent extends JmsComponent {
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     protected String convertPathToActualDestination(String path, Map<String, Object> parameters) {
         // support ActiveMQ destination options using the destination. prefix
         // http://activemq.apache.org/destination-options.html
-        Map options = PropertiesHelper.extractProperties(parameters, "destination.");
+        Map<String, Object> options = PropertiesHelper.extractProperties(parameters, "destination.");
 
         String query = URISupport.createQueryString(options);
 
@@ -242,8 +241,8 @@ public class ActiveMQComponent extends JmsComponent {
      */
     @Override
     public void setConfiguration(JmsConfiguration configuration) {
-        if (configuration instanceof ActiveMQConfiguration) {
-            ((ActiveMQConfiguration) configuration).setActiveMQComponent(this);
+        if (configuration instanceof ActiveMQConfiguration activeMQConfiguration) {
+            activeMQConfiguration.setActiveMQComponent(this);
         }
         super.setConfiguration(configuration);
     }
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
index a464efae91d..c4d9749248f 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
@@ -78,9 +78,9 @@ public class ActiveMQConfiguration extends JmsConfiguration {
 
     /**
      * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when messages are sent
-     * to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the
-     * Spring {@link JmsTemplate} which will create a new connection, session, producer for each message then close them
-     * all down again.
+     * to ActiveMQ from outside a message consuming thread, pooling will be used rather than the default with the Spring
+     * {@link JmsTemplate} which will create a new connection, session, producer for each message then close them all
+     * down again.
      * <p/>
      * The default value is false and a pooled connection is used by default.
      */
@@ -115,7 +115,8 @@ public class ActiveMQConfiguration extends JmsConfiguration {
      * <br/>
      * This option can be set to <tt>true</tt> to trust all packages (eg whitelist is *).
      * <p/>
-     * See more details at: http://activemq.apache.org/objectmessage.html
+     * See more details at:
+     * <a href="http://activemq.apache.org/objectmessage.html">http://activemq.apache.org/objectmessage.html</a>
      */
     public void setTrustAllPackages(boolean trustAllPackages) {
         this.trustAllPackages = trustAllPackages;
@@ -140,12 +141,10 @@ public class ActiveMQConfiguration extends JmsConfiguration {
         ActiveMQConnectionFactory acf = null;
 
         ConnectionFactory target = connectionFactory;
-        if (target instanceof CachingConnectionFactory) {
-            CachingConnectionFactory ccf = (CachingConnectionFactory) target;
+        if (target instanceof CachingConnectionFactory ccf) {
             target = ccf.getTargetConnectionFactory();
         }
-        if (target instanceof DelegatingConnectionFactory) {
-            DelegatingConnectionFactory dcf = (DelegatingConnectionFactory) target;
+        if (target instanceof DelegatingConnectionFactory dcf) {
             target = dcf.getTargetConnectionFactory();
         }
         if (target instanceof ActiveMQConnectionFactory) {
@@ -197,8 +196,8 @@ public class ActiveMQConfiguration extends JmsConfiguration {
 
     protected ConnectionFactory createPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
         try {
-            Class type = loadClass("org.apache.activemq.pool.PooledConnectionFactory", getClass().getClassLoader());
-            Constructor constructor = type.getConstructor(org.apache.activemq.ActiveMQConnectionFactory.class);
+            Class<?> type = loadClass("org.apache.activemq.pool.PooledConnectionFactory", getClass().getClassLoader());
+            Constructor<?> constructor = type.getConstructor(org.apache.activemq.ActiveMQConnectionFactory.class);
             return (ConnectionFactory) constructor.newInstance(connectionFactory);
         } catch (Exception e) {
             throw new RuntimeCamelException("Failed to instantiate PooledConnectionFactory: " + e, e);
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
index bbdc9892990..51d3b450a4b 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/OriginalDestinationPropagateStrategy.java
@@ -40,8 +40,7 @@ public class OriginalDestinationPropagateStrategy implements MessageCreatedStrat
         if (exchange.getIn() instanceof JmsMessage) {
             JmsMessage msg = exchange.getIn(JmsMessage.class);
             Message jms = msg.getJmsMessage();
-            if (jms instanceof ActiveMQMessage && message instanceof ActiveMQMessage) {
-                ActiveMQMessage amq = (ActiveMQMessage) jms;
+            if (jms instanceof ActiveMQMessage amq && message instanceof ActiveMQMessage) {
                 if (amq.getOriginalDestination() == null) {
                     ActiveMQDestination from = amq.getDestination();
                     if (from != null) {
diff --git a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
index 2de4e69142a..f20c1347455 100644
--- a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
+++ b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
@@ -112,14 +112,14 @@ public class AMQPComponent extends JmsComponent {
      */
     @Metadata(displayName = "Include AMQP Annotations")
     public void setIncludeAmqpAnnotations(boolean includeAmqpAnnotations) {
-        if (getConfiguration() instanceof AMQPConfiguration) {
-            ((AMQPConfiguration) getConfiguration()).setIncludeAmqpAnnotations(includeAmqpAnnotations);
+        if (getConfiguration() instanceof AMQPConfiguration amqpConfiguration) {
+            amqpConfiguration.setIncludeAmqpAnnotations(includeAmqpAnnotations);
         }
     }
 
     public boolean isIncludeAmqpAnnotations() {
-        if (getConfiguration() instanceof AMQPConfiguration) {
-            return ((AMQPConfiguration) getConfiguration()).isIncludeAmqpAnnotations();
+        if (getConfiguration() instanceof AMQPConfiguration amqpConfiguration) {
+            return amqpConfiguration.isIncludeAmqpAnnotations();
         }
         return false;
     }
diff --git a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPJmsBinding.java b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPJmsBinding.java
index cfd3096ac09..04893fb4716 100644
--- a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPJmsBinding.java
+++ b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPJmsBinding.java
@@ -40,8 +40,8 @@ public class AMQPJmsBinding extends JmsBinding {
 
     public AMQPJmsBinding(JmsEndpoint endpoint) {
         super(endpoint);
-        if (endpoint.getConfiguration() instanceof AMQPConfiguration) {
-            includeAmqpAnnotations = ((AMQPConfiguration) endpoint.getConfiguration()).isIncludeAmqpAnnotations();
+        if (endpoint.getConfiguration() instanceof AMQPConfiguration amqpConfiguration) {
+            includeAmqpAnnotations = amqpConfiguration.isIncludeAmqpAnnotations();
         }
     }
 
@@ -71,8 +71,7 @@ public class AMQPJmsBinding extends JmsBinding {
     }
 
     private AmqpJmsMessageFacade getMessageFacade(Message message) {
-        if (message instanceof JmsMessage) {
-            JmsMessage jmsMessage = (JmsMessage) message;
+        if (message instanceof JmsMessage jmsMessage) {
             if (jmsMessage.getFacade() instanceof AmqpJmsMessageFacade) {
                 return (AmqpJmsMessageFacade) jmsMessage.getFacade();
             }
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
index c3310125e65..ea743fa09b1 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
@@ -61,7 +61,7 @@ public class AS2ServerConnection {
 
         private final ServerSocket serversocket;
         private final HttpService httpService;
-        private UriHttpRequestHandlerMapper reqistry;
+        private final UriHttpRequestHandlerMapper reqistry;
 
         public RequestListenerThread(String as2Version,
                                      String originServer,
@@ -129,8 +129,8 @@ public class AS2ServerConnection {
     }
 
     class RequestHandlerThread extends Thread {
-        private HttpService httpService;
-        private HttpServerConnection serverConnection;
+        private final HttpService httpService;
+        private final HttpServerConnection serverConnection;
 
         public RequestHandlerThread(HttpService httpService, Socket inSocket) throws IOException {
             final int bufSize = 8 * 1024;
@@ -145,8 +145,7 @@ public class AS2ServerConnection {
         }
 
         private void setThreadName(HttpServerConnection serverConnection) {
-            if (serverConnection instanceof HttpInetConnection) {
-                HttpInetConnection inetConnection = (HttpInetConnection) serverConnection;
+            if (serverConnection instanceof HttpInetConnection inetConnection) {
                 setName(REQUEST_HANDLER_THREAD_NAME_PREFIX + inetConnection.getLocalPort());
             } else {
                 setName(REQUEST_HANDLER_THREAD_NAME_PREFIX + getId());
@@ -197,17 +196,13 @@ public class AS2ServerConnection {
 
     private RequestListenerThread listenerThread;
     private final Object lock = new Object();
-    private String as2Version;
-    private String originServer;
-    private String serverFqdn;
-    private Integer serverPortNumber;
-    private AS2SignatureAlgorithm signingAlgorithm;
-    private Certificate[] signingCertificateChain;
-    private PrivateKey signingPrivateKey;
-    private PrivateKey decryptingPrivateKey;
-    private String mdnMessageTemplate;
-    private Certificate[] validateSigningCertificateChain;
-    private SSLContext sslContext;
+    private final String as2Version;
+    private final String originServer;
+    private final String serverFqdn;
+    private final Certificate[] signingCertificateChain;
+    private final PrivateKey signingPrivateKey;
+    private final PrivateKey decryptingPrivateKey;
+    private final Certificate[] validateSigningCertificateChain;
 
     public AS2ServerConnection(String as2Version,
                                String originServer,
@@ -224,19 +219,16 @@ public class AS2ServerConnection {
         this.as2Version = ObjectHelper.notNull(as2Version, "as2Version");
         this.originServer = ObjectHelper.notNull(originServer, "userAgent");
         this.serverFqdn = ObjectHelper.notNull(serverFqdn, "serverFqdn");
-        this.serverPortNumber = ObjectHelper.notNull(serverPortNumber, "serverPortNumber");
-        this.signingAlgorithm = signingAlgorithm;
+        final Integer parserServerPortNumber = ObjectHelper.notNull(serverPortNumber, "serverPortNumber");
         this.signingCertificateChain = signingCertificateChain;
         this.signingPrivateKey = signingPrivateKey;
         this.decryptingPrivateKey = decryptingPrivateKey;
-        this.mdnMessageTemplate = mdnMessageTemplate;
         this.validateSigningCertificateChain = validateSigningCertificateChain;
-        this.sslContext = sslContext;
 
         listenerThread = new RequestListenerThread(
                 this.as2Version, this.originServer, this.serverFqdn,
-                this.serverPortNumber, this.signingAlgorithm, this.signingCertificateChain, this.signingPrivateKey,
-                this.decryptingPrivateKey, this.mdnMessageTemplate, validateSigningCertificateChain, this.sslContext);
+                parserServerPortNumber, signingAlgorithm, this.signingCertificateChain, this.signingPrivateKey,
+                this.decryptingPrivateKey, mdnMessageTemplate, validateSigningCertificateChain, sslContext);
         listenerThread.setDaemon(true);
         listenerThread.start();
     }
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
index 5cfb275ece0..2faa0354f2d 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
@@ -78,12 +78,12 @@ public class ResponseMDN implements HttpResponseInterceptor {
 
     private final String as2Version;
     private final String serverFQDN;
-    private AS2SignatureAlgorithm signingAlgorithm;
-    private Certificate[] signingCertificateChain;
-    private PrivateKey signingPrivateKey;
-    private PrivateKey decryptingPrivateKey;
-    private String mdnMessageTemplate;
-    private Certificate[] validateSigningCertificateChain;
+    private final AS2SignatureAlgorithm signingAlgorithm;
+    private final Certificate[] signingCertificateChain;
+    private final PrivateKey signingPrivateKey;
+    private final PrivateKey decryptingPrivateKey;
+    private final String mdnMessageTemplate;
+    private final Certificate[] validateSigningCertificateChain;
 
     private VelocityEngine velocityEngine;
 
@@ -121,12 +121,11 @@ public class ResponseMDN implements HttpResponseInterceptor {
         HttpCoreContext coreContext = HttpCoreContext.adapt(context);
 
         HttpRequest request = coreContext.getAttribute(HttpCoreContext.HTTP_REQUEST, HttpRequest.class);
-        if (request == null || !(request instanceof HttpEntityEnclosingRequest)) {
+        if (request == null || !(request instanceof HttpEntityEnclosingRequest httpEntityEnclosingRequest)) {
             // Not an enclosing request so nothing to do.
             return;
         }
 
-        HttpEntityEnclosingRequest httpEntityEnclosingRequest = (HttpEntityEnclosingRequest) request;
         LOG.debug("Processing MDN for request: {}", httpEntityEnclosingRequest);
 
         if (HttpMessageUtils.getHeaderValue(httpEntityEnclosingRequest, AS2Header.DISPOSITION_NOTIFICATION_TO) == null) {
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/EntityUtils.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/EntityUtils.java
index d9a03b4d1c5..7f93bf581b1 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/EntityUtils.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/EntityUtils.java
@@ -53,7 +53,7 @@ public final class EntityUtils {
 
     private static final Logger LOG = LoggerFactory.getLogger(EntityUtils.class);
 
-    private static AtomicLong partNumber = new AtomicLong();
+    private static final AtomicLong partNumber = new AtomicLong();
 
     private EntityUtils() {
     }
@@ -208,11 +208,10 @@ public final class EntityUtils {
     }
 
     public static byte[] getContent(HttpEntity entity) {
-        try {
-            final ByteArrayOutputStream outstream = new ByteArrayOutputStream();
-            entity.writeTo(outstream);
-            outstream.flush();
-            return outstream.toByteArray();
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            entity.writeTo(os);
+            os.flush();
+            return os.toByteArray();
         } catch (Exception e) {
             LOG.debug("failed to get content", e);
             return null;
@@ -221,35 +220,35 @@ public final class EntityUtils {
 
     public static boolean hasEntity(HttpMessage message) {
         boolean hasEntity = false;
-        if (message instanceof HttpEntityEnclosingRequest) {
-            hasEntity = ((HttpEntityEnclosingRequest) message).getEntity() != null;
-        } else if (message instanceof HttpResponse) {
-            hasEntity = ((HttpResponse) message).getEntity() != null;
+        if (message instanceof HttpEntityEnclosingRequest httpEntityEnclosingRequest) {
+            hasEntity = httpEntityEnclosingRequest.getEntity() != null;
+        } else if (message instanceof HttpResponse httpResponse) {
+            hasEntity = httpResponse.getEntity() != null;
         }
         return hasEntity;
     }
 
     public static HttpEntity getMessageEntity(HttpMessage message) {
-        if (message instanceof HttpEntityEnclosingRequest) {
-            return ((HttpEntityEnclosingRequest) message).getEntity();
-        } else if (message instanceof HttpResponse) {
-            return ((HttpResponse) message).getEntity();
+        if (message instanceof HttpEntityEnclosingRequest httpEntityEnclosingRequest) {
+            return httpEntityEnclosingRequest.getEntity();
+        } else if (message instanceof HttpResponse httpResponse) {
+            return httpResponse.getEntity();
         }
         return null;
     }
 
     public static void setMessageEntity(HttpMessage message, HttpEntity entity) {
-        if (message instanceof HttpEntityEnclosingRequest) {
-            ((HttpEntityEnclosingRequest) message).setEntity(entity);
-        } else if (message instanceof HttpResponse) {
-            ((HttpResponse) message).setEntity(entity);
+        if (message instanceof HttpEntityEnclosingRequest httpEntityEnclosingRequest) {
+            httpEntityEnclosingRequest.setEntity(entity);
+        } else if (message instanceof HttpResponse httpResponse) {
+            httpResponse.setEntity(entity);
         }
         Header contentTypeHeader = entity.getContentType();
         if (contentTypeHeader != null) {
             message.setHeader(contentTypeHeader);
         }
-        if (entity instanceof MimeEntity) {
-            Header contentTransferEncodingHeader = ((MimeEntity) entity).getContentTransferEncoding();
+        if (entity instanceof MimeEntity mimeEntity) {
+            Header contentTransferEncodingHeader = mimeEntity.getContentTransferEncoding();
             if (contentTransferEncodingHeader != null) {
                 message.setHeader(contentTransferEncodingHeader);
             }
@@ -278,9 +277,9 @@ public final class EntityUtils {
 
     public static String printEntity(HttpEntity entity) throws IOException {
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
-             PrintStream ps = new PrintStream(baos, true, "utf-8")) {
+             PrintStream ps = new PrintStream(baos, true, StandardCharsets.UTF_8)) {
             printEntity(ps, entity);
-            return baos.toString(StandardCharsets.UTF_8.name());
+            return baos.toString(StandardCharsets.UTF_8);
         }
     }
 
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java
index 0bac259d767..507056dbd04 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java
@@ -65,13 +65,13 @@ public final class HttpMessageUtils {
     public static <T> T getEntity(HttpMessage message, Class<T> type) {
         ObjectHelper.notNull(message, "message");
         ObjectHelper.notNull(type, "type");
-        if (message instanceof HttpEntityEnclosingRequest) {
-            HttpEntity entity = ((HttpEntityEnclosingRequest) message).getEntity();
+        if (message instanceof HttpEntityEnclosingRequest httpEntityEnclosingRequest) {
+            HttpEntity entity = httpEntityEnclosingRequest.getEntity();
             if (entity != null && type.isInstance(entity)) {
                 return type.cast(entity);
             }
-        } else if (message instanceof HttpResponse) {
-            HttpEntity entity = ((HttpResponse) message).getEntity();
+        } else if (message instanceof HttpResponse httpResponse) {
+            HttpEntity entity = httpResponse.getEntity();
             if (entity != null && type.isInstance(entity)) {
                 type.cast(entity);
             }
@@ -137,7 +137,7 @@ public final class HttpMessageUtils {
         ContentType contentType = ContentType.parse(contentTypeString);
 
         EntityParser.parseAS2MessageEntity(message);
-        ApplicationEntity ediEntity = null;
+        ApplicationEntity ediEntity;
         switch (contentType.getMimeType().toLowerCase()) {
             case AS2MimeType.APPLICATION_EDIFACT:
             case AS2MimeType.APPLICATION_EDI_X12:
@@ -225,9 +225,7 @@ public final class HttpMessageUtils {
         MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity();
         if (mimeEntity instanceof ApplicationEntity) {
             ediEntity = (ApplicationEntity) mimeEntity;
-        } else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) {
-            ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity
-                    = (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity;
+        } else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity) {
             ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity, decrpytingAndSigningInfo);
         } else {
             throw new HttpException(
@@ -240,7 +238,7 @@ public final class HttpMessageUtils {
     private static ApplicationEntity extractEdiPayloadFromEnvelopedEntity(
             ApplicationPkcs7MimeEnvelopedDataEntity envelopedDataEntity, DecrpytingAndSigningInfo decrpytingAndSigningInfo)
             throws HttpException {
-        ApplicationEntity ediEntity = null;
+        ApplicationEntity ediEntity;
 
         MimeEntity entity = envelopedDataEntity.getEncryptedEntity(decrpytingAndSigningInfo.getDecryptingPrivateKey());
         String contentTypeString = entity.getContentTypeValue();
@@ -266,9 +264,7 @@ public final class HttpMessageUtils {
                 MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity();
                 if (mimeEntity instanceof ApplicationEntity) {
                     ediEntity = (ApplicationEntity) mimeEntity;
-                } else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) {
-                    ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity
-                            = (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity;
+                } else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity) {
                     ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity, decrpytingAndSigningInfo);
                 } else {
 
@@ -301,7 +297,7 @@ public final class HttpMessageUtils {
     public static ApplicationEntity extractEdiPayloadFromCompressedEntity(
             ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity, DecrpytingAndSigningInfo decrpytingAndSigningInfo)
             throws HttpException {
-        ApplicationEntity ediEntity = null;
+        ApplicationEntity ediEntity;
 
         MimeEntity entity = compressedDataEntity.getCompressedEntity(new ZlibExpanderProvider());
         String contentTypeString = entity.getContentTypeValue();
@@ -325,8 +321,8 @@ public final class HttpMessageUtils {
                 }
 
                 MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity();
-                if (mimeEntity instanceof ApplicationEntity) {
-                    ediEntity = (ApplicationEntity) mimeEntity;
+                if (mimeEntity instanceof ApplicationEntity applicationEntity) {
+                    ediEntity = applicationEntity;
                 } else {
 
                     throw new HttpException(
@@ -345,8 +341,8 @@ public final class HttpMessageUtils {
     }
 
     public static class DecrpytingAndSigningInfo {
-        private Certificate[] validateSigningCertificateChain;
-        private PrivateKey decryptingPrivateKey;
+        private final Certificate[] validateSigningCertificateChain;
+        private final PrivateKey decryptingPrivateKey;
 
         public DecrpytingAndSigningInfo(Certificate[] validateSigningCertificateChain, PrivateKey decryptingPrivateKey) {
             this.validateSigningCertificateChain = validateSigningCertificateChain;
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
index cff3b7ba171..70c80c8d4af 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
@@ -835,13 +835,13 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
     private Triple<HttpEntity, HttpRequest, HttpResponse> executeRequest(Map<String, Object> headers) throws Exception {
         HttpEntity responseEntity = requestBodyAndHeaders("direct://SEND", EDI_MESSAGE, headers);
 
-        return new ImmutableTriple(responseEntity, requestHandler.getRequest(), requestHandler.getResponse());
+        return new ImmutableTriple<>(responseEntity, requestHandler.getRequest(), requestHandler.getResponse());
     }
 
     private Triple<HttpEntity, HttpRequest, HttpResponse> executeRequest2(Map<String, Object> headers) throws Exception {
         HttpEntity responseEntity = requestBodyAndHeaders("direct://SEND2", EDI_MESSAGE, headers);
 
-        return new ImmutableTriple(responseEntity, requestHandler.getRequest(), requestHandler.getResponse());
+        return new ImmutableTriple<>(responseEntity, requestHandler.getRequest(), requestHandler.getResponse());
     }
 
     @Override
diff --git a/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java b/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java
index 2f7394f6e27..0f27b6ee379 100644
--- a/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java
+++ b/components/camel-atom/src/main/java/org/apache/camel/component/feed/FeedEntryPollingConsumer.java
@@ -58,7 +58,7 @@ public abstract class FeedEntryPollingConsumer<E> extends FeedPollingConsumer im
                 ResumeAdapter adapter = resumeStrategy.getAdapter();
 
                 if (adapter instanceof EntryFilter) {
-                    valid = ((EntryFilter) adapter).isValidEntry(entry);
+                    valid = ((EntryFilter<E>) adapter).isValidEntry(entry);
                 }
             }
             if (valid) {
diff --git a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
index 0ade389b101..5814af843e6 100644
--- a/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
+++ b/components/camel-azure/camel-azure-files/src/main/java/org/apache/camel/component/file/azure/FilesConsumer.java
@@ -47,7 +47,7 @@ public class FilesConsumer extends RemoteFileConsumer<ShareFileItem> {
 
     public FilesConsumer(FilesEndpoint endpoint, Processor processor,
                          FilesOperations fileOperations,
-                         GenericFileProcessStrategy processStrategy) {
+                         GenericFileProcessStrategy<?> processStrategy) {
         super(endpoint, processor, fileOperations, processStrategy);
         this.endpointPath = endpoint.getConfiguration().getDirectory();
     }
diff --git a/components/camel-azure/camel-azure-storage-blob/src/main/java/org/apache/camel/component/azure/storage/blob/operations/BlobOperationResponse.java b/components/camel-azure/camel-azure-storage-blob/src/main/java/org/apache/camel/component/azure/storage/blob/operations/BlobOperationResponse.java
index 74d85d36e07..801bb1c9667 100644
--- a/components/camel-azure/camel-azure-storage-blob/src/main/java/org/apache/camel/component/azure/storage/blob/operations/BlobOperationResponse.java
+++ b/components/camel-azure/camel-azure-storage-blob/src/main/java/org/apache/camel/component/azure/storage/blob/operations/BlobOperationResponse.java
@@ -56,11 +56,11 @@ public final class BlobOperationResponse {
         return new BlobOperationResponse(true);
     }
 
-    public static BlobOperationResponse create(final Response response) {
+    public static BlobOperationResponse create(final Response<?> response) {
         return buildResponse(response, false);
     }
 
-    public static BlobOperationResponse createWithEmptyBody(final Response response) {
+    public static BlobOperationResponse createWithEmptyBody(final Response<?> response) {
         return buildResponse(response, true);
     }
 
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
index cdfb0036a37..4838228f5e3 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
@@ -330,16 +330,16 @@ class BeanValidatorRouteTest extends CamelTestSupport {
     }
 
     private void setLicensePlates(Object cars, String licensePlate) {
-        if (cars instanceof Car) {
-            ((Car) cars).setLicensePlate(licensePlate);
+        if (cars instanceof Car car) {
+            car.setLicensePlate(licensePlate);
         } else {
             ((Iterable) cars).forEach(car -> ((Car) car).setLicensePlate(licensePlate));
         }
     }
 
     private void setManufacturer(Object cars, String manufacturer) {
-        if (cars instanceof Car) {
-            ((Car) cars).setManufacturer(manufacturer);
+        if (cars instanceof Car car) {
+            car.setManufacturer(manufacturer);
         } else {
             ((Iterable) cars).forEach(car -> ((Car) car).setManufacturer(manufacturer));
         }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java
index fb5a65226d9..686ebea06e5 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java
@@ -133,7 +133,8 @@ public abstract class AbstractCamelInvocationHandler implements InvocationHandle
                             String name = header.value();
                             exchange.getIn().setHeader(name, value);
                         } else if (ann.annotationType().isAssignableFrom(Headers.class)) {
-                            Map map = exchange.getContext().getTypeConverter().tryConvertTo(Map.class, exchange, value);
+                            Map<String, Object> map
+                                    = exchange.getContext().getTypeConverter().tryConvertTo(Map.class, exchange, value);
                             if (map != null) {
                                 exchange.getIn().getHeaders().putAll(map);
                             }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
index fd8082be7e1..7381aa92c30 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanComponent.java
@@ -38,7 +38,6 @@ public class BeanComponent extends DefaultComponent {
 
     // use an internal soft cache for BeanInfo as they are costly to introspect
     // for example the bean language using OGNL expression runs much faster reusing the BeanInfo from this cache
-    @SuppressWarnings("unchecked")
     private final Map<BeanInfoCacheKey, BeanInfo> beanInfoCache = LRUCacheFactory.newLRUSoftCache(1000);
 
     @Metadata(defaultValue = "Singleton", description = "Scope of bean."
@@ -80,8 +79,7 @@ public class BeanComponent extends DefaultComponent {
 
     @Override
     protected void doShutdown() throws Exception {
-        if (LOG.isDebugEnabled() && beanInfoCache instanceof LRUCache) {
-            LRUCache cache = (LRUCache) this.beanInfoCache;
+        if (LOG.isDebugEnabled() && beanInfoCache instanceof LRUCache<BeanInfoCacheKey, BeanInfo> cache) {
             LOG.debug("Clearing BeanInfo cache[size={}, hits={}, misses={}, evicted={}]", cache.size(), cache.getHits(),
                     cache.getMisses(), cache.getEvicted());
         }
diff --git a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
index 24f402f3d6c..a7f81d280ab 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
@@ -239,7 +239,7 @@ public class BeanLanguage extends TypedLanguageSupport implements ScriptingLangu
 
             if (beanName.startsWith("type:")) {
                 try {
-                    Class clazz = getCamelContext().getClassResolver().resolveMandatoryClass(beanName.substring(5));
+                    Class<?> clazz = getCamelContext().getClassResolver().resolveMandatoryClass(beanName.substring(5));
                     answer = new BeanExpression(clazz, method);
                 } catch (ClassNotFoundException e) {
                     throw RuntimeCamelException.wrapRuntimeException(e);
diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxSearchManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxSearchManager.java
index b32a2e09564..9cf5aee05da 100644
--- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxSearchManager.java
+++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxSearchManager.java
@@ -78,7 +78,7 @@ public class BoxSearchManager {
             bsp.setAncestorFolderIds(Collections.singletonList(folderId));
             bsp.setQuery(query);
 
-            LinkedList<BoxItem> result = new LinkedList();
+            LinkedList<BoxItem> result = new LinkedList<>();
             BoxSearch bs = new BoxSearch(boxConnection);
             PartialCollection<BoxItem.Info> partialResult;
             int offset = 0;
diff --git a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraProducer.java b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraProducer.java
index 8c738b42306..12e508d7094 100644
--- a/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraProducer.java
+++ b/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraProducer.java
@@ -78,8 +78,7 @@ public class CassandraProducer extends DefaultProducer {
             cqlParams = null;
         } else if (objectArrayClazz.isInstance(cqlParamsObj)) {
             cqlParams = objectArrayClazz.cast(cqlParamsObj);
-        } else if (cqlParamsObj instanceof Collection) {
-            final Collection cqlParamsColl = (Collection) cqlParamsObj;
+        } else if (cqlParamsObj instanceof Collection<?> cqlParamsColl) {
             cqlParams = cqlParamsColl.toArray();
         } else {
             cqlParams = new Object[] { cqlParamsObj };
diff --git a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
index 52d648b11a1..3afacbcc499 100644
--- a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
+++ b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdBinding.java
@@ -79,7 +79,7 @@ public class CometdBinding {
 
         Message message = new DefaultMessage(camelContext);
         message.setBody(data);
-        Map headers = getHeadersFromMessage(cometdMessage);
+        Map<String, Object> headers = getHeadersFromMessage(cometdMessage);
         if (headers != null) {
             message.setHeaders(headers);
         }
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulRegistry.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulRegistry.java
index 52d17389aab..0239f3455d4 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulRegistry.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulRegistry.java
@@ -156,7 +156,7 @@ public class ConsulRegistry implements Registry {
     }
 
     @Override
-    public void bind(String id, Class type, Object bean) throws RuntimeCamelException {
+    public void bind(String id, Class<?> type, Object bean) throws RuntimeCamelException {
         put(id, bean);
     }
 
diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
index a76039c7044..060537730ca 100644
--- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
+++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java
@@ -137,8 +137,8 @@ abstract class CsvUnmarshaller {
             try {
                 reader = new InputStreamReader(inputStream, ExchangeHelper.getCharsetName(exchange));
                 CSVParser parser = new CSVParser(reader, format);
-                CsvIterator answer = new CsvIterator(parser, converter);
-                // add to UoW so we can close the iterator so it can release any resources
+                CsvIterator<?> answer = new CsvIterator<>(parser, converter);
+                // add to UoW, so we can close the iterator, so it can release any resources
                 exchange.getExchangeExtension().addOnCompletion(new CsvUnmarshalOnCompletion(answer));
                 return answer;
             } catch (Exception e) {
diff --git a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
index 63e7df08886..1f9152d68d2 100644
--- a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
+++ b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
@@ -701,7 +701,7 @@ public class CxfRsProducer extends DefaultAsyncProducer {
                 exchange.getMessage().getHeaders().putAll(binding.bindResponseHeadersToCamelHeaders(response, exchange));
 
                 if (genericType != null && !genericType.equals(Void.TYPE)) {
-                    GenericType genericTypeClone = new GenericType(this.genericType);
+                    GenericType<?> genericTypeClone = new GenericType<>(this.genericType);
                     exchange.getMessage()
                             .setBody(binding.bindResponseToCamelBody(response.readEntity(genericTypeClone), exchange));
                 } else if (responseClass != null && !responseClass.equals(Void.TYPE)) {
@@ -872,8 +872,8 @@ public class CxfRsProducer extends DefaultAsyncProducer {
         }
 
         public void start() {
-            if (cache instanceof LRUCache) {
-                ((LRUCache) cache).resetStatistics();
+            if (cache instanceof LRUCache<?, ?> lruCache) {
+                lruCache.resetStatistics();
             }
         }
 
diff --git a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumComponent.java b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumComponent.java
index 10949958974..37b6e97010b 100644
--- a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumComponent.java
+++ b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumComponent.java
@@ -39,7 +39,7 @@ public abstract class DebeziumComponent<C extends EmbeddedDebeziumConfiguration>
     }
 
     @Override
-    protected DebeziumEndpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters)
+    protected DebeziumEndpoint<C> createEndpoint(String uri, String remaining, Map<String, Object> parameters)
             throws Exception {
         // use a copy on the endpoint
         final C configuration = (C) getConfiguration().copy();
@@ -55,7 +55,7 @@ public abstract class DebeziumComponent<C extends EmbeddedDebeziumConfiguration>
             configuration.setName(remaining);
         }
 
-        DebeziumEndpoint endpoint = initializeDebeziumEndpoint(uri, configuration);
+        DebeziumEndpoint<C> endpoint = initializeDebeziumEndpoint(uri, configuration);
         setProperties(endpoint, parameters);
 
         // extract the additional properties map
@@ -76,7 +76,7 @@ public abstract class DebeziumComponent<C extends EmbeddedDebeziumConfiguration>
         return endpoint;
     }
 
-    protected abstract DebeziumEndpoint initializeDebeziumEndpoint(String uri, C configuration);
+    protected abstract DebeziumEndpoint<C> initializeDebeziumEndpoint(String uri, C configuration);
 
     public abstract C getConfiguration();
 
diff --git a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumEndpoint.java b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumEndpoint.java
index f9cfc4ce18f..311944f0d4a 100644
--- a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumEndpoint.java
+++ b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumEndpoint.java
@@ -38,7 +38,7 @@ import org.apache.kafka.connect.source.SourceRecord;
  */
 public abstract class DebeziumEndpoint<C extends EmbeddedDebeziumConfiguration> extends DefaultEndpoint {
 
-    protected DebeziumEndpoint(String uri, DebeziumComponent component) {
+    protected DebeziumEndpoint(String uri, DebeziumComponent<C> component) {
         super(uri, component);
     }
 
diff --git a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumTestComponent.java b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumTestComponent.java
index 47621fd8bcf..8db31ad771e 100644
--- a/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumTestComponent.java
+++ b/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumTestComponent.java
@@ -44,7 +44,7 @@ public final class DebeziumTestComponent extends DebeziumComponent<FileConnector
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<FileConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, FileConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumTestEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/DebeziumDb2Component.java b/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/DebeziumDb2Component.java
index e37384a032a..7d6ef4b2587 100644
--- a/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/DebeziumDb2Component.java
+++ b/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/DebeziumDb2Component.java
@@ -49,7 +49,7 @@ public final class DebeziumDb2Component extends DebeziumComponent<Db2ConnectorEm
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<Db2ConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, Db2ConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumDb2Endpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/DebeziumMongodbComponent.java b/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/DebeziumMongodbComponent.java
index aa6b41bab2a..ac7a890add2 100644
--- a/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/DebeziumMongodbComponent.java
+++ b/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/DebeziumMongodbComponent.java
@@ -48,7 +48,7 @@ public final class DebeziumMongodbComponent extends DebeziumComponent<MongoDbCon
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<MongoDbConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, MongoDbConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumMongodbEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/DebeziumMySqlComponent.java b/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/DebeziumMySqlComponent.java
index 574335d5426..b506cbb73aa 100644
--- a/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/DebeziumMySqlComponent.java
+++ b/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/DebeziumMySqlComponent.java
@@ -48,7 +48,7 @@ public final class DebeziumMySqlComponent extends DebeziumComponent<MySqlConnect
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<MySqlConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, MySqlConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumMySqlEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/DebeziumOracleComponent.java b/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/DebeziumOracleComponent.java
index 407532220f2..3e9233e7e51 100644
--- a/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/DebeziumOracleComponent.java
+++ b/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/DebeziumOracleComponent.java
@@ -49,7 +49,7 @@ public final class DebeziumOracleComponent extends DebeziumComponent<OracleConne
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<OracleConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, OracleConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumOracleEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/DebeziumPostgresComponent.java b/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/DebeziumPostgresComponent.java
index 9061eac3416..c718ef0450d 100644
--- a/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/DebeziumPostgresComponent.java
+++ b/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/DebeziumPostgresComponent.java
@@ -48,7 +48,7 @@ public final class DebeziumPostgresComponent extends DebeziumComponent<PostgresC
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<PostgresConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, PostgresConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumPostgresEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/DebeziumSqlserverComponent.java b/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/DebeziumSqlserverComponent.java
index 4e5e01f852c..606937f2832 100644
--- a/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/DebeziumSqlserverComponent.java
+++ b/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/DebeziumSqlserverComponent.java
@@ -49,7 +49,7 @@ public final class DebeziumSqlserverComponent extends DebeziumComponent<SqlServe
     }
 
     @Override
-    protected DebeziumEndpoint initializeDebeziumEndpoint(
+    protected DebeziumEndpoint<SqlServerConnectorEmbeddedDebeziumConfiguration> initializeDebeziumEndpoint(
             String uri, SqlServerConnectorEmbeddedDebeziumConfiguration configuration) {
         return new DebeziumSqlserverEndpoint(uri, this, configuration);
     }
diff --git a/components/camel-dns/src/main/java/org/apache/camel/component/dns/policy/DnsActivation.java b/components/camel-dns/src/main/java/org/apache/camel/component/dns/policy/DnsActivation.java
index 85e28b86cd6..af0db306433 100644
--- a/components/camel-dns/src/main/java/org/apache/camel/component/dns/policy/DnsActivation.java
+++ b/components/camel-dns/src/main/java/org/apache/camel/component/dns/policy/DnsActivation.java
@@ -86,7 +86,7 @@ public class DnsActivation {
 
         List<String> resolved = new ArrayList<>();
         while (!hostnames.isEmpty()) {
-            NamingEnumeration attributeEnumeration = null;
+            NamingEnumeration<?> attributeEnumeration = null;
             try {
                 String hostname = hostnames.remove(0);
                 InetAddress inetAddress = InetAddress.getByName(hostname);
diff --git a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/es/ElasticsearchProducer.java b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/es/ElasticsearchProducer.java
index 3267266c6f9..53670ca938d 100644
--- a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/es/ElasticsearchProducer.java
+++ b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/es/ElasticsearchProducer.java
@@ -41,7 +41,6 @@ import co.elastic.clients.elasticsearch.core.MsearchResponse;
 import co.elastic.clients.elasticsearch.core.SearchRequest;
 import co.elastic.clients.elasticsearch.core.SearchResponse;
 import co.elastic.clients.elasticsearch.core.UpdateRequest;
-import co.elastic.clients.elasticsearch.core.UpdateResponse;
 import co.elastic.clients.elasticsearch.indices.DeleteIndexRequest;
 import co.elastic.clients.elasticsearch.indices.DeleteIndexResponse;
 import co.elastic.clients.elasticsearch.indices.ExistsRequest;
@@ -384,10 +383,10 @@ class ElasticsearchProducer extends DefaultAsyncProducer {
      * Updates asynchronously a document.
      */
     private void processUpdateAsync(ActionContext ctx, Class<?> documentClass) {
-        UpdateRequest.Builder updateRequestBuilder = ctx.getMessage().getBody(UpdateRequest.Builder.class);
+        UpdateRequest.Builder<?, ?> updateRequestBuilder = ctx.getMessage().getBody(UpdateRequest.Builder.class);
         onComplete(
                 ctx.getClient().update(updateRequestBuilder.build(), documentClass)
-                        .thenApply(r -> ((UpdateResponse<?>) r).id()),
+                        .thenApply(WriteResponseBase::id),
                 ctx);
     }
 
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java b/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java
index e8867fae354..a9ace6fd6d5 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java
@@ -295,8 +295,7 @@ public class FileOperations implements GenericFileOperations<File> {
                 // if no charset and not in appending mode, then we can try
                 // using file directly (optimized)
                 Object body = exchange.getIn().getBody();
-                if (body instanceof WrappedFile) {
-                    WrappedFile wrapped = (WrappedFile) body;
+                if (body instanceof WrappedFile<?> wrapped) {
                     body = wrapped.getFile();
                     if (!(body instanceof File)) {
                         // the wrapped file may be from remote (FTP) which then can store
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFile.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFile.java
index 03480973257..cc8d919129a 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFile.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFile.java
@@ -76,8 +76,7 @@ public class GenericFile<T> implements WrappedFile<T> {
      * @param source the source
      * @param result the result
      */
-    @SuppressWarnings("unchecked")
-    public void copyFrom(GenericFile source, GenericFile result) {
+    public void copyFrom(GenericFile<T> source, GenericFile<T> result) {
         result.setCopyFromAbsoluteFilePath(source.getAbsoluteFilePath());
         result.setEndpointPath(source.getEndpointPath());
         result.setAbsolute(source.isAbsolute());
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileDefaultMoveExistingFileStrategy.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileDefaultMoveExistingFileStrategy.java
index e4c98f67b59..7f79c8b63fa 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileDefaultMoveExistingFileStrategy.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileDefaultMoveExistingFileStrategy.java
@@ -35,7 +35,7 @@ public class GenericFileDefaultMoveExistingFileStrategy implements FileMoveExist
      * Moves any existing file due fileExists=Move is in use.
      */
     @Override
-    public boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperations operations, String fileName)
+    public boolean moveExistingFile(GenericFileEndpoint<?> endpoint, GenericFileOperations<?> operations, String fileName)
             throws GenericFileOperationFailedException {
 
         // need to evaluate using a dummy and simulate the file first, to have
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileFilter.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileFilter.java
index 814214a0638..5178dc96d62 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileFilter.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileFilter.java
@@ -22,7 +22,7 @@ package org.apache.camel.component.file;
 public interface GenericFileFilter<T> {
 
     /**
-     * Tests whether or not the specified generic file should be included
+     * Tests whether the specified generic file should be included
      *
      * @param  file the generic file to be tested
      * @return      <code>true</code> if and only if <code>file</code> should be included
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileMoveExistingStrategy.java b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileMoveExistingStrategy.java
index 33314a20033..621770e3d72 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileMoveExistingStrategy.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileMoveExistingStrategy.java
@@ -31,12 +31,12 @@ public interface FileMoveExistingStrategy {
      *
      * @param  endpoint   the given endpoint of the component
      * @param  operations file operations API of the relevant component's API
-     * @return            result of the file opeartion can be returned note that for now, implemetion classes for file
-     *                    component and ftp components, always returned true. However,if such a need of direct usage of
-     *                    File API returning true|false, you can use that return value for implementation's return
-     *                    value.
+     * @return            result of the file operation can be returned note that for now, implementation classes for
+     *                    file component and ftp components, always returned true. However,if such a need of direct
+     *                    usage of File API returning true|false, you can use that return value for implementation's
+     *                    return value.
      */
-    boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperations operations, String fileName)
+    boolean moveExistingFile(GenericFileEndpoint<?> endpoint, GenericFileOperations<?> operations, String fileName)
             throws GenericFileOperationFailedException;
 
 }
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
index 921217ccc78..4a25d9ccee6 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
@@ -168,8 +168,8 @@ public class MarkerFileExclusiveReadLockStrategy implements GenericFileExclusive
         this.deleteOrphanLockFiles = deleteOrphanLockFiles;
     }
 
-    private static void deleteLockFiles(
-            File dir, boolean recursive, String endpointPath, GenericFileFilter filter, GenericFileFilter antFilter,
+    private static <T> void deleteLockFiles(
+            File dir, boolean recursive, String endpointPath, GenericFileFilter<T> filter, GenericFileFilter<T> antFilter,
             Pattern excludePattern,
             Pattern includePattern) {
         File[] files = dir.listFiles();
@@ -218,10 +218,10 @@ public class MarkerFileExclusiveReadLockStrategy implements GenericFileExclusive
     }
 
     @SuppressWarnings("unchecked")
-    private static boolean acceptFile(
-            File file, String endpointPath, GenericFileFilter filter, GenericFileFilter antFilter, Pattern excludePattern,
+    private static <T> boolean acceptFile(
+            File file, String endpointPath, GenericFileFilter<T> filter, GenericFileFilter<T> antFilter, Pattern excludePattern,
             Pattern includePattern) {
-        GenericFile gf = new GenericFile();
+        GenericFile gf = new GenericFile<>();
         gf.setEndpointPath(endpointPath);
         gf.setFile(file);
         gf.setFileNameOnly(file.getName());
diff --git a/components/camel-flink/src/main/java/org/apache/camel/component/flink/ConvertingDataSetCallback.java b/components/camel-flink/src/main/java/org/apache/camel/component/flink/ConvertingDataSetCallback.java
index 3796fcc4265..f91bd9a366c 100644
--- a/components/camel-flink/src/main/java/org/apache/camel/component/flink/ConvertingDataSetCallback.java
+++ b/components/camel-flink/src/main/java/org/apache/camel/component/flink/ConvertingDataSetCallback.java
@@ -25,9 +25,9 @@ public abstract class ConvertingDataSetCallback<T> implements DataSetCallback<T>
 
     private final CamelContext camelContext;
 
-    private final Class[] payloadTypes;
+    private final Class<?>[] payloadTypes;
 
-    protected ConvertingDataSetCallback(CamelContext camelContext, Class... payloadTypes) {
+    protected ConvertingDataSetCallback(CamelContext camelContext, Class<?>... payloadTypes) {
         this.camelContext = camelContext;
         this.payloadTypes = payloadTypes;
     }
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpDefaultMoveExistingFileStrategy.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpDefaultMoveExistingFileStrategy.java
index 31df2a83c28..6ca60cde8b8 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpDefaultMoveExistingFileStrategy.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpDefaultMoveExistingFileStrategy.java
@@ -39,7 +39,7 @@ public class FtpDefaultMoveExistingFileStrategy implements FileMoveExistingStrat
      * Moves any existing file due fileExists=Move is in use.
      */
     @Override
-    public boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperations operations, String fileName)
+    public boolean moveExistingFile(GenericFileEndpoint<?> endpoint, GenericFileOperations<?> operations, String fileName)
             throws GenericFileOperationFailedException {
         // need to evaluate using a dummy and simulate the file first, to have
         // access to all the file attributes
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpDefaultMoveExistingFileStrategy.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpDefaultMoveExistingFileStrategy.java
index 7c5623e6d8a..2f375a98f5f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpDefaultMoveExistingFileStrategy.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpDefaultMoveExistingFileStrategy.java
@@ -36,7 +36,7 @@ public class SftpDefaultMoveExistingFileStrategy implements FileMoveExistingStra
      * Moves any existing file due fileExists=Move is in use.
      */
     @Override
-    public boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperations operations, String fileName)
+    public boolean moveExistingFile(GenericFileEndpoint<?> endpoint, GenericFileOperations<?> operations, String fileName)
             throws GenericFileOperationFailedException {
         // need to evaluate using a dummy and simulate the file first, to have
         // access to all the file attributes
diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitBranchConsumer.java b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitBranchConsumer.java
index 6dc075d43ac..869ee6431d6 100644
--- a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitBranchConsumer.java
+++ b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitBranchConsumer.java
@@ -28,7 +28,7 @@ import org.eclipse.jgit.lib.Ref;
 
 public class GitBranchConsumer extends AbstractGitConsumer {
 
-    private List branchesConsumed = new ArrayList();
+    private final List<String> branchesConsumed = new ArrayList<>();
 
     public GitBranchConsumer(GitEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitCommitConsumer.java b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitCommitConsumer.java
index 122a85a880b..9eb85f2c68f 100644
--- a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitCommitConsumer.java
+++ b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitCommitConsumer.java
@@ -24,11 +24,12 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.git.GitConstants;
 import org.apache.camel.component.git.GitEndpoint;
 import org.apache.camel.util.ObjectHelper;
+import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.revwalk.RevCommit;
 
 public class GitCommitConsumer extends AbstractGitConsumer {
 
-    private List commitsConsumed = new ArrayList();
+    private final List<ObjectId> commitsConsumed = new ArrayList<>();
 
     public GitCommitConsumer(GitEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitTagConsumer.java b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitTagConsumer.java
index 7052764487e..5cd972dc364 100644
--- a/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitTagConsumer.java
+++ b/components/camel-git/src/main/java/org/apache/camel/component/git/consumer/GitTagConsumer.java
@@ -27,7 +27,7 @@ import org.eclipse.jgit.lib.Ref;
 
 public class GitTagConsumer extends AbstractGitConsumer {
 
-    private List tagsConsumed = new ArrayList();
+    private final List<String> tagsConsumed = new ArrayList<>();
 
     public GitTagConsumer(GitEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
diff --git a/components/camel-google/camel-google-bigquery/src/test/java/org/apache/camel/component/google/bigquery/integration/AsyncIT.java b/components/camel-google/camel-google-bigquery/src/test/java/org/apache/camel/component/google/bigquery/integration/AsyncIT.java
index 22feb2e587c..94615fffee8 100644
--- a/components/camel-google/camel-google-bigquery/src/test/java/org/apache/camel/component/google/bigquery/integration/AsyncIT.java
+++ b/components/camel-google/camel-google-bigquery/src/test/java/org/apache/camel/component/google/bigquery/integration/AsyncIT.java
@@ -75,7 +75,7 @@ public class AsyncIT extends BigQueryITSupport {
 
     @Test
     public void sendAsync() throws Exception {
-        List<Map> objects = new ArrayList<>();
+        List<Map<String, String>> objects = new ArrayList<>();
         for (int i = 0; i < 5; i++) {
             Exchange exchange = new DefaultExchange(context);
             String uuidCol1 = UUID.randomUUID().toString();
@@ -92,7 +92,7 @@ public class AsyncIT extends BigQueryITSupport {
 
         sendResult.assertIsSatisfied(4000);
 
-        for (Map object : objects) {
+        for (Map<String, String> object : objects) {
             assertRowExist(TABLE_ID, object);
         }
     }
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java
index 3113acfda5b..606925799e6 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java
@@ -34,7 +34,7 @@ import org.apache.camel.component.hazelcast.HazelcastOperation;
  */
 public class HazelcastQueueProducer extends HazelcastDefaultProducer {
 
-    private IQueue<Object> queue;
+    private final IQueue<Object> queue;
 
     public HazelcastQueueProducer(HazelcastInstance hazelcastInstance, HazelcastDefaultEndpoint endpoint, String queueName) {
         super(endpoint);
@@ -94,7 +94,7 @@ public class HazelcastQueueProducer extends HazelcastDefaultProducer {
                 break;
 
             case DRAIN_TO:
-                this.drainTo((Collection) drainToCollection, exchange);
+                this.drainTo((Collection<?>) drainToCollection, exchange);
                 break;
 
             case TAKE:
@@ -158,7 +158,7 @@ public class HazelcastQueueProducer extends HazelcastDefaultProducer {
     }
 
     private void removeAll(Exchange exchange) {
-        Collection body = exchange.getIn().getBody(Collection.class);
+        Collection<?> body = exchange.getIn().getBody(Collection.class);
         this.queue.removeAll(body);
     }
 
@@ -172,7 +172,7 @@ public class HazelcastQueueProducer extends HazelcastDefaultProducer {
     }
 
     private void retainAll(Exchange exchange) {
-        Collection body = exchange.getIn().getBody(Collection.class);
+        Collection<?> body = exchange.getIn().getBody(Collection.class);
         this.queue.retainAll(body);
     }
 }
diff --git a/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java b/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
index ff172c97bb1..dfd7fe1dfe1 100644
--- a/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
+++ b/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
@@ -31,12 +31,12 @@ public class FastHeadersMapFactory implements HeadersMapFactory {
 
     @Override
     public Map<String, Object> newMap() {
-        return new CaseInsensitiveMap();
+        return new CaseInsensitiveMap<>();
     }
 
     @Override
     public Map<String, Object> newMap(Map<String, Object> map) {
-        return new CaseInsensitiveMap(map);
+        return new CaseInsensitiveMap<>(map);
     }
 
     @Override
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpRestServletResolveConsumerStrategy.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpRestServletResolveConsumerStrategy.java
index d7bb7abc359..1ebb3d14b04 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpRestServletResolveConsumerStrategy.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpRestServletResolveConsumerStrategy.java
@@ -37,7 +37,7 @@ public class HttpRestServletResolveConsumerStrategy extends HttpServletResolveCo
         if (path == null) {
             return null;
         }
-        List<RestConsumerContextPathMatcher.ConsumerPath> paths = new ArrayList<>();
+        List<RestConsumerContextPathMatcher.ConsumerPath<HttpConsumer>> paths = new ArrayList<>();
         for (final Map.Entry<String, HttpConsumer> entry : consumers.entrySet()) {
             paths.add(new HttpRestConsumerPath(entry.getValue()));
         }
diff --git a/components/camel-huawei/camel-huaweicloud-dms/src/main/java/org/apache/camel/component/huaweicloud/dms/models/DmsRegion.java b/components/camel-huawei/camel-huaweicloud-dms/src/main/java/org/apache/camel/component/huaweicloud/dms/models/DmsRegion.java
index 803cee7552a..219828fa9f0 100644
--- a/components/camel-huawei/camel-huaweicloud-dms/src/main/java/org/apache/camel/component/huaweicloud/dms/models/DmsRegion.java
+++ b/components/camel-huawei/camel-huaweicloud-dms/src/main/java/org/apache/camel/component/huaweicloud/dms/models/DmsRegion.java
@@ -44,7 +44,7 @@ public final class DmsRegion {
     }
 
     private static Map<String, Region> createStaticFields() {
-        Map<String, Region> map = new HashMap();
+        Map<String, Region> map = new HashMap<>();
         map.put("af-south-1", AF_SOUTH_1);
         map.put("cn-north-4", CN_NORTH_4);
         map.put("cn-north-1", CN_NORTH_1);
diff --git a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
index 5e5acda7623..bb8f83faf79 100644
--- a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
+++ b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
@@ -163,7 +163,7 @@ public class FallbackTypeConverter {
         if (type.isAssignableFrom(o.getClass())) {
             return type.cast(o);
         } else {
-            return type.cast(((JAXBElement) o).getValue());
+            return type.cast(((JAXBElement<?>) o).getValue());
         }
     }
 
diff --git a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbHelper.java b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbHelper.java
index bd42e11358e..cf032921b76 100644
--- a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbHelper.java
+++ b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbHelper.java
@@ -33,7 +33,7 @@ public final class JaxbHelper {
         }
 
         // find the first method that has @XmlElementDecl with one parameter that matches the type
-        Class factory = getObjectFactory(camelContext, type);
+        Class<?> factory = getObjectFactory(camelContext, type);
         if (factory != null) {
             for (Method m : factory.getMethods()) {
                 final XmlElementDecl a = m.getAnnotation(XmlElementDecl.class);
@@ -50,7 +50,7 @@ public final class JaxbHelper {
         return null;
     }
 
-    public static <T> Class getObjectFactory(CamelContext camelContext, Class<T> type) {
+    public static <T> Class<?> getObjectFactory(CamelContext camelContext, Class<T> type) {
         if (camelContext == null) {
             return null;
         }
diff --git a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
index 0b204f7322b..e494c44fbbb 100644
--- a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
+++ b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
@@ -71,8 +71,8 @@ public class DefaultJdbcPrepareStatementStrategy implements JdbcPrepareStatement
             // create an iterator that returns the value in the named order
             try {
 
-                return new Iterator<Object>() {
-                    private NamedQueryParser parser = new NamedQueryParser(query);
+                return new Iterator<>() {
+                    private final NamedQueryParser parser = new NamedQueryParser(query);
                     private Object next;
                     private boolean done;
                     private boolean preFetched;
diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AttachFileProducer.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AttachFileProducer.java
index e130481f76e..e04bda02d5e 100644
--- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AttachFileProducer.java
+++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AttachFileProducer.java
@@ -52,7 +52,7 @@ public class AttachFileProducer extends DefaultProducer {
         if (body instanceof File) {
             file = (File) body;
         } else {
-            WrappedFile wf = exchange.getIn().getBody(WrappedFile.class);
+            WrappedFile<?> wf = exchange.getIn().getBody(WrappedFile.class);
             if (wf != null && wf.getFile() instanceof File) {
                 file = (File) wf.getFile();
             }
diff --git a/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/AuthorRecordBean.java b/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/AuthorRecordBean.java
index d8a9419e2d7..76a03278c38 100644
--- a/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/AuthorRecordBean.java
+++ b/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/AuthorRecordBean.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.jooq.beans;
 
+import org.apache.camel.component.jooq.db.tables.records.AuthorRecord;
 import org.jooq.Query;
 import org.jooq.ResultQuery;
 import org.jooq.impl.DSL;
@@ -27,7 +28,7 @@ import static org.apache.camel.component.jooq.db.Tables.AUTHOR;
 public class AuthorRecordBean {
     private int id = 1;
 
-    public ResultQuery select() {
+    public ResultQuery<AuthorRecord> select() {
         return DSL.selectFrom(AUTHOR).where(AUTHOR.ID.eq(id));
     }
 
diff --git a/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/BookStoreRecordBean.java b/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/BookStoreRecordBean.java
index 5eb4779680c..925581bd545 100644
--- a/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/BookStoreRecordBean.java
+++ b/components/camel-jooq/src/test/java/org/apache/camel/component/jooq/beans/BookStoreRecordBean.java
@@ -32,7 +32,7 @@ public class BookStoreRecordBean {
         return new BookStoreRecord(name);
     }
 
-    public ResultQuery select() {
+    public ResultQuery<BookStoreRecord> select() {
         return DSL.selectFrom(BOOK_STORE).where(BOOK_STORE.NAME.eq(name));
     }
 
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/AbstractJpaTest.java b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/AbstractJpaTest.java
index 2221cea3604..e7f53160a77 100644
--- a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/AbstractJpaTest.java
+++ b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/AbstractJpaTest.java
@@ -85,7 +85,7 @@ public abstract class AbstractJpaTest extends CamelTestSupport {
         assertEntityInDB(size, SendEmail.class);
     }
 
-    protected void assertEntityInDB(int size, Class entityType) {
+    protected void assertEntityInDB(int size, Class<?> entityType) {
         List<?> results = entityManager.createQuery("select o from " + entityType.getName() + " o").getResultList();
         assertEquals(size, results.size());
 
diff --git a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
index 0856d8205d0..78a77268dc9 100644
--- a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
+++ b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.jsonvalidator;
 
+import java.io.Serial;
 import java.util.Collections;
 import java.util.Set;
 import java.util.stream.Collectors;
@@ -27,6 +28,7 @@ import org.apache.camel.ValidationException;
 
 public class JsonValidationException extends ValidationException {
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     private final JsonSchema schema;
@@ -41,7 +43,7 @@ public class JsonValidationException extends ValidationException {
     public JsonValidationException(Exchange exchange, JsonSchema schema, Exception e) {
         super(e.getMessage(), exchange, e);
         this.schema = schema;
-        this.errors = Collections.EMPTY_SET;
+        this.errors = Collections.emptySet();
     }
 
     public JsonSchema getSchema() {
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathExpression.java b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathExpression.java
index 25c35f8e6a2..1c8b9cccc29 100644
--- a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathExpression.java
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathExpression.java
@@ -173,9 +173,9 @@ public class JsonPathExpression extends ExpressionAdapter {
                     // in some cases we get a single element that is wrapped in a List, so unwrap that
                     // if we for example want to grab the single entity and convert that to a int/boolean/String etc
                     boolean resultIsCollection = Collection.class.isAssignableFrom(resultType);
-                    boolean singleElement = result instanceof List && ((List) result).size() == 1;
+                    boolean singleElement = result instanceof List && ((List<?>) result).size() == 1;
                     if (singleElement && !resultIsCollection) {
-                        result = ((List) result).get(0);
+                        result = ((List<?>) result).get(0);
                         LOG.trace("Unwrapping result: {} from single element List before converting to: {}", result,
                                 resultType);
                     }
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
index 6da7ab333d6..2399d0a0643 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
@@ -21,7 +21,6 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Locale;
-import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import io.fabric8.kubernetes.client.ConfigBuilder;
@@ -109,12 +108,12 @@ abstract class BasePropertiesFunction extends ServiceSupport implements Properti
                 PropertyConfigurer configurer = PluginHelper.getConfigurerResolver(camelContext)
                         .resolvePropertyConfigurer(ConfigBuilder.class.getName(), camelContext);
 
-                // use copy to keep track of which options was configureed or not
+                // use copy to keep track of which options was configured or not
                 OrderedLocationProperties copy = new OrderedLocationProperties();
                 copy.putAll(properties);
 
                 PropertyBindingSupport.build()
-                        .withProperties((Map) copy)
+                        .withProperties(copy.asMap())
                         .withFluentBuilder(true)
                         .withIgnoreCase(true)
                         .withReflection(false)
diff --git a/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java b/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
index 0ae07daf37e..3ea7299f4fe 100644
--- a/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
+++ b/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
@@ -238,19 +238,19 @@ public final class DSAnnotationProcessor {
                     for (CreateIndex createIndex : indexes) {
                         if (createIndex.type() == JdbmIndex.class) {
                             // JDBM index
-                            JdbmIndex index = new JdbmIndex(createIndex.attribute(), false);
+                            JdbmIndex index = new JdbmIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         } else if (createIndex.type() == MavibotIndex.class) {
                             // Mavibot index
-                            MavibotIndex index = new MavibotIndex(createIndex.attribute(), false);
+                            MavibotIndex index = new MavibotIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         } else {
                             // The annotation does not specify a specific index
                             // type.
                             // We use the generic index implementation.
-                            JdbmIndex index = new JdbmIndex(createIndex.attribute(), false);
+                            JdbmIndex index = new JdbmIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         }
diff --git a/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/Description.java b/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/Description.java
index f8c1b113191..3b7719403ae 100644
--- a/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/Description.java
+++ b/components/camel-ldap/src/test/java/org/apache/directory/server/core/integ5/Description.java
@@ -30,7 +30,7 @@ public class Description {
         displayName = String.format("%s(%s)", method.getName(), method.getDeclaringClass().getName());
     }
 
-    public Description(Class clazz) {
+    public Description(Class<?> clazz) {
         annotated = clazz;
         displayName = clazz.getName();
     }
diff --git a/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java b/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
index 0ae07daf37e..3ea7299f4fe 100644
--- a/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
+++ b/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/DSAnnotationProcessor.java
@@ -238,19 +238,19 @@ public final class DSAnnotationProcessor {
                     for (CreateIndex createIndex : indexes) {
                         if (createIndex.type() == JdbmIndex.class) {
                             // JDBM index
-                            JdbmIndex index = new JdbmIndex(createIndex.attribute(), false);
+                            JdbmIndex index = new JdbmIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         } else if (createIndex.type() == MavibotIndex.class) {
                             // Mavibot index
-                            MavibotIndex index = new MavibotIndex(createIndex.attribute(), false);
+                            MavibotIndex index = new MavibotIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         } else {
                             // The annotation does not specify a specific index
                             // type.
                             // We use the generic index implementation.
-                            JdbmIndex index = new JdbmIndex(createIndex.attribute(), false);
+                            JdbmIndex index = new JdbmIndex<>(createIndex.attribute(), false);
 
                             btreePartition.addIndexedAttributes(index);
                         }
diff --git a/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/Description.java b/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/Description.java
index f8c1b113191..3b7719403ae 100644
--- a/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/Description.java
+++ b/components/camel-ldif/src/test/java/org/apache/directory/server/core/integ5/Description.java
@@ -30,7 +30,7 @@ public class Description {
         displayName = String.format("%s(%s)", method.getName(), method.getDeclaringClass().getName());
     }
 
-    public Description(Class clazz) {
+    public Description(Class<?> clazz) {
         annotated = clazz;
         displayName = clazz.getName();
     }
diff --git a/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/serializer/jackson/BodyDeserializer.java b/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/serializer/jackson/BodyDeserializer.java
index 83d2a9eebfb..3c685869f1a 100644
--- a/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/serializer/jackson/BodyDeserializer.java
+++ b/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/serializer/jackson/BodyDeserializer.java
@@ -35,7 +35,7 @@ public class BodyDeserializer extends StdDeserializer<Object> {
         ObjectMapper om = (ObjectMapper) p.getCodec();
 
         if (treeNode.get("clazz") != null) {
-            Class cl = om.readValue(treeNode.get("clazz").toString(), Class.class);
+            Class<?> cl = om.readValue(treeNode.get("clazz").toString(), Class.class);
             return om.readValue(treeNode.get("data").toString(), cl);
         }
 
diff --git a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java
index 8509ca2bdfd..96ddd273390 100644
--- a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java
+++ b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java
@@ -140,8 +140,7 @@ public class MasterConsumer extends DefaultConsumer implements ResumeAware {
             getEndpoint().getCamelContext().addStartupListener((StartupListener) delegatedConsumer);
         }
 
-        if (delegatedConsumer instanceof ResumeAware && resumeStrategy != null) {
-            final ResumeAware resumeAwareConsumer = (ResumeAware) delegatedConsumer;
+        if (delegatedConsumer instanceof ResumeAware resumeAwareConsumer && resumeStrategy != null) {
             LOG.info("Setting up the resume adapter for the resume strategy in the delegated consumer");
             ResumeAdapter resumeAdapter
                     = AdapterHelper.eval(clusterService.getCamelContext(), resumeAwareConsumer, resumeStrategy);
diff --git a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceProcessor.java b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceProcessor.java
index a02a85a408e..b0f3948ba78 100644
--- a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceProcessor.java
+++ b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceProcessor.java
@@ -74,7 +74,7 @@ public class FaultToleranceProcessor extends AsyncProcessorSupport
 
     private static final Logger LOG = LoggerFactory.getLogger(FaultToleranceProcessor.class);
 
-    private volatile CircuitBreaker circuitBreaker;
+    private volatile CircuitBreaker<?> circuitBreaker;
     private CamelContext camelContext;
     private String id;
     private String routeId;
@@ -128,11 +128,11 @@ public class FaultToleranceProcessor extends AsyncProcessorSupport
         this.routeId = routeId;
     }
 
-    public CircuitBreaker getCircuitBreaker() {
+    public CircuitBreaker<?> getCircuitBreaker() {
         return circuitBreaker;
     }
 
-    public void setCircuitBreaker(CircuitBreaker circuitBreaker) {
+    public void setCircuitBreaker(CircuitBreaker<?> circuitBreaker) {
         this.circuitBreaker = circuitBreaker;
     }
 
@@ -253,7 +253,7 @@ public class FaultToleranceProcessor extends AsyncProcessorSupport
             task = (CircuitBreakerTask) taskFactory.acquire(exchange, callback);
 
             // circuit breaker
-            FaultToleranceStrategy target = circuitBreaker;
+            FaultToleranceStrategy<?> target = circuitBreaker;
 
             // 1. bulkhead
             if (config.isBulkheadEnabled()) {
@@ -264,7 +264,7 @@ public class FaultToleranceProcessor extends AsyncProcessorSupport
             // 2. timeout
             if (config.isTimeoutEnabled()) {
                 TimeoutWatcher watcher = new ScheduledExecutorTimeoutWatcher(scheduledExecutorService);
-                target = new Timeout(target, "timeout", config.getTimeoutDuration(), watcher);
+                target = new Timeout<>(target, "timeout", config.getTimeoutDuration(), watcher);
             }
             // 3. fallback
             if (fallbackProcessor != null) {
diff --git a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
index 6a7caf011c9..12f2b800261 100644
--- a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
+++ b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
@@ -65,7 +65,7 @@ public class FaultToleranceReifier extends ProcessorReifier<CircuitBreakerDefini
         FaultToleranceProcessor answer = new FaultToleranceProcessor(configuration, processor, fallback);
         // using any existing circuit breakers?
         if (config.getCircuitBreaker() != null) {
-            CircuitBreaker cb = mandatoryLookup(parseString(config.getCircuitBreaker()), CircuitBreaker.class);
+            CircuitBreaker<?> cb = mandatoryLookup(parseString(config.getCircuitBreaker()), CircuitBreaker.class);
             answer.setCircuitBreaker(cb);
         }
         configureBulkheadExecutorService(answer, config);
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerMultiplexChannelHandler.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerMultiplexChannelHandler.java
index 3cfa3868fd2..edbf0a07062 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerMultiplexChannelHandler.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerMultiplexChannelHandler.java
@@ -238,7 +238,7 @@ public class HttpServerMultiplexChannelHandler extends SimpleChannelInboundHandl
         // use the path as key to find the consumer handler to use
         path = pathAsKey(path);
 
-        List<RestConsumerContextPathMatcher.ConsumerPath> paths = new ArrayList<>();
+        List<RestConsumerContextPathMatcher.ConsumerPath<HttpServerChannelHandler>> paths = new ArrayList<>();
         for (final HttpServerChannelHandler handler : consumers) {
             paths.add(new HttpRestConsumerPath(handler));
         }
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestModelConverters.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestModelConverters.java
index a02caa8bd65..84e47be76fb 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestModelConverters.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestModelConverters.java
@@ -30,8 +30,6 @@ import io.swagger.v3.core.converter.ModelConverters;
 import io.swagger.v3.core.jackson.ModelResolver;
 import io.swagger.v3.oas.models.OpenAPI;
 import io.swagger.v3.oas.models.media.Schema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A Camel extended {@link ModelConverters} where we are appending vendor extensions to include the java class name of
@@ -40,7 +38,6 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("rawtypes")
 public class RestModelConverters {
 
-    private static final Logger LOG = LoggerFactory.getLogger(RestModelConverters.class);
     private static final ModelConverters MODEL30_CONVERTERS;
 
     static {
@@ -55,7 +52,7 @@ public class RestModelConverters {
         MODEL20_CONVERTERS.addConverter(new ClassNameExtensionModelResolver());
     }
 
-    public List<? extends Schema> readClass(OpenAPI oasDocument, Class<?> clazz) {
+    public List<? extends Schema<?>> readClass(OpenAPI oasDocument, Class<?> clazz) {
         if (clazz.equals(java.io.File.class)) {
             // File is a special type in OAS2 / OAS3 (no model)
             return null;
@@ -64,14 +61,14 @@ public class RestModelConverters {
         }
     }
 
-    private List<? extends Schema> readClassOpenApi3(Class<?> clazz) {
+    private List<? extends Schema<?>> readClassOpenApi3(Class<?> clazz) {
         String name = clazz.getName();
         if (!name.contains(".")) {
             return null;
         }
 
         Map<String, Schema> swaggerModel = MODEL30_CONVERTERS.readAll(clazz);
-        List<Schema> modelSchemas = new java.util.ArrayList<>();
+        List<Schema<?>> modelSchemas = new java.util.ArrayList<>();
         swaggerModel.forEach((key, schema) -> {
             schema.setName(key);
             modelSchemas.add(schema);
@@ -105,7 +102,7 @@ public class RestModelConverters {
 
         @Override
         public Schema resolve(AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next) {
-            Schema result = delegate.resolve(annotatedType, context, next);
+            Schema<?> result = delegate.resolve(annotatedType, context, next);
 
             if (result != null && Objects.equals("object", result.getType())) {
                 JavaType type;
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
index bdf3e3456a8..14950c13511 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
@@ -495,7 +495,7 @@ public class RestOpenApiReader {
 
                 // set type on parameter
                 if (!"body".equals(parameter.getIn())) {
-                    Schema schema = new Schema();
+                    Schema schema = new Schema<>();
                     final boolean isArray = getValue(camelContext, param.getDataType()).equalsIgnoreCase("array");
                     final List<String> allowableValues = getValue(camelContext, param.getAllowableValuesAsStringList());
                     final boolean hasAllowableValues = allowableValues != null && !allowableValues.isEmpty();
@@ -579,7 +579,7 @@ public class RestOpenApiReader {
                     reqBody.setDescription(getValue(camelContext, param.getDescription()));
                     op.setRequestBody(reqBody);
                     String type = getValue(camelContext, param.getDataType() != null ? param.getDataType() : verb.getType());
-                    Schema bodySchema = null;
+                    Schema<?> bodySchema = null;
                     if (type != null) {
                         if (type.endsWith("[]")) {
                             type = type.substring(0, type.length() - 2);
@@ -638,7 +638,7 @@ public class RestOpenApiReader {
                     Content responseContent = new Content();
                     MediaType contentType = new MediaType();
                     responseContent.addMediaType(produce, contentType);
-                    Schema model = modelTypeAsProperty(getValue(camelContext, verb.getOutType()), openApi);
+                    Schema<?> model = modelTypeAsProperty(getValue(camelContext, verb.getOutType()), openApi);
                     contentType.setSchema(model);
                     response.setContent(responseContent);
                     // response.description = "Output type";
@@ -680,7 +680,7 @@ public class RestOpenApiReader {
             }
         } else if (Objects.equals(parameterSchema.getType(), "array")) {
 
-            Schema<?> itemsSchema = null;
+            Schema<?> itemsSchema;
 
             if (Integer.class.equals(type)) {
                 itemsSchema = new IntegerSchema();
@@ -893,8 +893,8 @@ public class RestOpenApiReader {
         return className;
     }
 
-    private Schema modelTypeAsProperty(String typeName, OpenAPI openApi) {
-        Schema prop = null;
+    private Schema<?> modelTypeAsProperty(String typeName, OpenAPI openApi) {
+        Schema<?> prop = null;
         boolean array = typeName.endsWith("[]");
         if (array) {
             typeName = typeName.substring(0, typeName.length() - 2);
@@ -929,13 +929,13 @@ public class RestOpenApiReader {
         }
 
         if (array) {
-            Schema items = new Schema();
+            Schema<?> items = new Schema<>();
             if (ref != null) {
                 items.set$ref(OAS30_SCHEMA_DEFINITION_PREFIX + ref);
             }
             prop = new ArraySchema().items(items);
         } else if (prop == null) {
-            prop = new Schema().$ref(OAS30_SCHEMA_DEFINITION_PREFIX + ref);
+            prop = new Schema<>().$ref(OAS30_SCHEMA_DEFINITION_PREFIX + ref);
         }
         return prop;
     }
@@ -949,18 +949,18 @@ public class RestOpenApiReader {
      */
     private void appendModels(Class<?> clazz, OpenAPI openApi) {
         RestModelConverters converters = new RestModelConverters();
-        List<? extends Schema> models = converters.readClass(openApi, clazz);
+        List<? extends Schema<?>> models = converters.readClass(openApi, clazz);
         if (models == null) {
             return;
         }
         if (openApi.getComponents() == null) {
             openApi.setComponents(new Components());
         }
-        for (Schema newSchema : models) {
+        for (Schema<?> newSchema : models) {
             // favor keeping any existing model that has the vendor extension in the model
             boolean addSchema = true;
             if (openApi.getComponents().getSchemas() != null) {
-                Schema existing = openApi.getComponents().getSchemas().get(newSchema.getName());
+                Schema<?> existing = openApi.getComponents().getSchemas().get(newSchema.getName());
                 if (existing != null) {
                     // check classname extension
                     Object oldClassName = getClassNameExtension(existing);
@@ -1030,7 +1030,7 @@ public class RestOpenApiReader {
         });
         // Remap the names
         for (Map.Entry<String, String> namePair : names.entrySet()) {
-            Schema schema = document.getComponents().getSchemas().get(namePair.getKey());
+            Schema<?> schema = document.getComponents().getSchemas().get(namePair.getKey());
             if (schema != null) {
                 document.getComponents().getSchemas().remove(namePair.getKey());
                 document.getComponents().addSchemas(namePair.getValue(), schema);
@@ -1106,7 +1106,7 @@ public class RestOpenApiReader {
                 filterSchema(schema.getItems(), params, cookies, headers);
             }
             if (schema.getProperties() != null) {
-                for (Schema propSchema : (Collection<Schema>) schema.getProperties().values()) {
+                for (Schema<?> propSchema : (Collection<Schema>) schema.getProperties().values()) {
                     filterSchema(propSchema, params, cookies, headers);
                 }
             }
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
index 1c00f40e91d..1bca892728e 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
@@ -100,7 +100,7 @@ public class DomainProducer extends AbstractKeystoneProducer {
     private Domain messageToDomain(Message message) {
         Domain domain = message.getBody(Domain.class);
         if (domain == null) {
-            Map headers = message.getHeaders();
+            Map<String, Object> headers = message.getHeaders();
             DomainBuilder builder = Builders.domain();
 
             StringHelper.notEmpty(message.getHeader(OpenstackConstants.NAME, String.class), "Name");
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
index fba7054a06c..74ecb6f4e3f 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
@@ -149,7 +149,7 @@ public class ContainerProducer extends AbstractOpenstackProducer {
     private CreateUpdateContainerOptions messageToCreateUpdateOptions(Message message) {
         CreateUpdateContainerOptions options = message.getBody(CreateUpdateContainerOptions.class);
         if (options == null) {
-            Map headers = message.getHeaders();
+            Map<String, Object> headers = message.getHeaders();
             if (headers.containsKey(SwiftConstants.CONTAINER_METADATA_PREFIX)) {
                 options = getCreateUpdateOptions(options)
                         .metadata(message.getHeader(SwiftConstants.CONTAINER_METADATA_PREFIX, Map.class));
diff --git a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
index bdc6c54d2f8..159e43d47d7 100644
--- a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
+++ b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
@@ -39,9 +39,7 @@ import org.optaplanner.core.api.solver.SolverFactory;
              category = { Category.WORKFLOW }, headersClass = OptaPlannerConstants.class)
 public class OptaPlannerEndpoint extends DefaultEndpoint {
     private static final Map<String, Solver<Object>> SOLVERS = new HashMap<>();
-    private static final Map<Long, Set<OptaplannerSolutionEventListener>> SOLUTION_LISTENER = new HashMap();
-
-    private SolverFactory<Object> solverFactory;
+    private static final Map<Long, Set<OptaplannerSolutionEventListener>> SOLUTION_LISTENER = new HashMap<>();
 
     @UriParam
     private OptaPlannerConfiguration configuration;
@@ -63,7 +61,7 @@ public class OptaPlannerEndpoint extends DefaultEndpoint {
 
     protected Solver<Object> createSolver() {
         ClassLoader classLoader = getCamelContext().getApplicationContextClassLoader();
-        solverFactory = SolverFactory.createFromXmlResource(configuration.getConfigFile(), classLoader);
+        SolverFactory<Object> solverFactory = SolverFactory.createFromXmlResource(configuration.getConfigFile(), classLoader);
         return solverFactory.buildSolver();
     }
 
diff --git a/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java b/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
index 6d7a4f7b7d2..b2aca2a7e6b 100644
--- a/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
+++ b/components/camel-parquet-avro/src/main/java/org/apache/camel/dataformat/parquet/avro/ParquetAvroDataFormat.java
@@ -90,7 +90,7 @@ public class ParquetAvroDataFormat extends ServiceSupport implements DataFormat,
             model = GenericData.get();
         }
 
-        try (ParquetWriter writer = AvroParquetWriter.builder(parquetOutputStream)
+        try (ParquetWriter<Object> writer = AvroParquetWriter.builder(parquetOutputStream)
                 .withSchema(schema)
                 .withDataModel(model)
                 .withConf(conf)
@@ -119,7 +119,7 @@ public class ParquetAvroDataFormat extends ServiceSupport implements DataFormat,
             model = new ReflectData(unmarshalType.getClassLoader());
         }
 
-        try (ParquetReader reader = AvroParquetReader.builder(parquetInputStream)
+        try (ParquetReader<?> reader = AvroParquetReader.builder(parquetInputStream)
                 .withDataModel(model)
                 .disableCompatibility() // always use this (since this is a new project)
                 .withConf(conf)
diff --git a/components/camel-quartz/src/generated/resources/org/apache/camel/component/quartz/quartz.json b/components/camel-quartz/src/generated/resources/org/apache/camel/component/quartz/quartz.json
index de40a56974f..75d56dd09e0 100644
--- a/components/camel-quartz/src/generated/resources/org/apache/camel/component/quartz/quartz.json
+++ b/components/camel-quartz/src/generated/resources/org/apache/camel/component/quartz/quartz.json
@@ -32,7 +32,7 @@
     "autowiredEnabled": { "index": 7, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
     "scheduler": { "index": 8, "kind": "property", "displayName": "Scheduler", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.quartz.Scheduler", "deprecated": false, "autowired": true, "secret": false, "description": "To use the custom configured Quartz scheduler, instead of creating a new Scheduler." },
     "schedulerFactory": { "index": 9, "kind": "property", "displayName": "Scheduler Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.quartz.SchedulerFactory", "deprecated": false, "autowired": false, "secret": false, "description": "To use the custom SchedulerFactory which is used to create the Scheduler." },
-    "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the scheduler should be auto started. This options is default true" },
+    "autoStartScheduler": { "index": 10, "kind": "property", "displayName": "Auto Start Scheduler", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started. This option is default true" },
     "interruptJobsOnShutdown": { "index": 11, "kind": "property", "displayName": "Interrupt Jobs On Shutdown", "group": "scheduler", "label": "scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to interrupt jobs on shutdown which forces the scheduler to shutdown quicker and attempt to interrupt any running jobs. If this is enabled then any running jobs can fail d [...]
   },
   "properties": {
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
index b4246b14796..ce3a510589a 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
@@ -96,9 +96,9 @@ public class QuartzComponent extends DefaultComponent implements ExtendedStartup
     }
 
     /**
-     * Whether or not the scheduler should be auto started.
+     * Whether the scheduler should be auto started.
      * <p/>
-     * This options is default true
+     * This option is default true
      */
     public void setAutoStartScheduler(boolean autoStartScheduler) {
         this.autoStartScheduler = autoStartScheduler;
diff --git a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEntryPollingConsumer.java b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEntryPollingConsumer.java
index 3041a25c651..52bc7ec054c 100644
--- a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEntryPollingConsumer.java
+++ b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEntryPollingConsumer.java
@@ -45,7 +45,7 @@ public class RssEntryPollingConsumer extends FeedEntryPollingConsumer {
 
     @SuppressWarnings("unchecked")
     protected void sortEntries() {
-        Collections.sort(list, new RssDateComparator());
+        list.sort(new RssDateComparator());
     }
 
     @Override
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResult.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResult.java
index 3a877f32f9c..87601739693 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResult.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResult.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.salesforce.api.dto.approval;
 
 import java.io.IOException;
+import java.io.Serial;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -36,13 +37,13 @@ import org.apache.camel.component.salesforce.api.dto.approval.ApprovalResult.Res
 @JsonDeserialize(using = ApprovalResultDeserializer.class)
 public final class ApprovalResult implements Serializable, Iterable<Result> {
 
-    public static final class ApprovalResultDeserializer extends JsonDeserializer {
+    public static final class ApprovalResultDeserializer extends JsonDeserializer<ApprovalResult> {
 
-        private static final TypeReference<List<Result>> RESULTS_TYPE = new TypeReference<List<Result>>() {
+        private static final TypeReference<List<Result>> RESULTS_TYPE = new TypeReference<>() {
         };
 
         @Override
-        public Object deserialize(final JsonParser parser, final DeserializationContext context)
+        public ApprovalResult deserialize(final JsonParser parser, final DeserializationContext context)
                 throws IOException {
             final List<Result> results = parser.readValueAs(RESULTS_TYPE);
 
@@ -53,6 +54,7 @@ public final class ApprovalResult implements Serializable, Iterable<Result> {
 
     public static final class Result implements Serializable {
 
+        @Serial
         private static final long serialVersionUID = 1L;
 
         private final List<String> actorIds;
@@ -114,6 +116,7 @@ public final class ApprovalResult implements Serializable, Iterable<Result> {
 
     }
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     private final List<Result> results;
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNode.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNode.java
index f92f2ab25a2..f659e72c7b4 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNode.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNode.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.salesforce.api.dto.composite;
 
+import java.io.Serial;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -60,6 +61,7 @@ public final class SObjectNode implements Serializable {
 
     private static final String SOBJECT_TYPE_PARAM = "type";
 
+    @Serial
     private static final long serialVersionUID = 1L;
 
     @JsonUnwrapped
@@ -265,8 +267,8 @@ public final class SObjectNode implements Serializable {
         return object.getAttributes().getType();
     }
 
-    Stream<Class> objectTypes() {
-        return Stream.concat(Stream.of((Class) object.getClass()), getChildNodes().flatMap(SObjectNode::objectTypes));
+    Stream<Class<?>> objectTypes() {
+        return Stream.concat(Stream.of((Class<?>) object.getClass()), getChildNodes().flatMap(SObjectNode::objectTypes));
     }
 
     void setErrors(final List<RestError> errors) {
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
index cc6d3699c9f..cecd9fd630f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
@@ -234,7 +234,7 @@ public abstract class AbstractRestProcessor extends AbstractSalesforceProcessor
         final Object approvalBody = incomingMessage.getBody();
 
         final boolean bodyIsIterable = approvalBody instanceof Iterable;
-        final boolean bodyIsIterableButEmpty = bodyIsIterable && !((Iterable) approvalBody).iterator().hasNext();
+        final boolean bodyIsIterableButEmpty = bodyIsIterable && !((Iterable<?>) approvalBody).iterator().hasNext();
 
         // body contains nothing of interest if it's null, holds an empty
         // iterable or cannot be converted to
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java
index 5885b8b58bf..377f812328d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessor.java
@@ -284,7 +284,7 @@ public class JsonRestProcessor extends AbstractRestProcessor {
                 Class<?> responseClass = exchange.getProperty(RESPONSE_CLASS, Class.class);
                 response = (AbstractQueryRecordsBase<?>) objectMapper.readValue(responseEntity, responseClass);
                 out.setHeader(HEADER_SALESFORCE_QUERY_RESULT_TOTAL_SIZE, response.getTotalSize());
-                QueryResultIterator iterator
+                QueryResultIterator<?> iterator
                         = new QueryResultIterator(
                                 objectMapper, responseClass, restClient, determineHeaders(exchange), response);
                 out.setBody(iterator);
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
index e9b6b2b39c3..ad6bc6cc94c 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
@@ -74,7 +74,7 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
     @Test
     public void testGetRecentReports() throws Exception {
 
-        final List recentReports = template().requestBody("direct:getRecentReports", null, List.class);
+        final List<?> recentReports = template().requestBody("direct:getRecentReports", null, List.class);
 
         assertNotNull(recentReports, "getRecentReports");
         LOG.debug("getRecentReports: {}", recentReports);
@@ -155,7 +155,7 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
         final String testReportInstanceId = reportInstance.getId();
 
         // 4. getReportInstances
-        final List reportInstances = template().requestBody("direct:getReportInstances", testReportId, List.class);
+        final List<?> reportInstances = template().requestBody("direct:getReportInstances", testReportId, List.class);
 
         assertNotNull(reportInstances, "getReportInstances");
         assertFalse(reportInstances.isEmpty(), "getReportInstances empty");
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
index fd34cea19ed..c3b0fe0dc59 100644
--- a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
+++ b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
@@ -617,7 +617,7 @@ public abstract class XQueryBuilder implements Expression, Predicate, NamespaceA
                 TreeInfo doc = config.buildDocumentTree(source);
                 dynamicQueryContext.setContextItem(doc.getRootNode());
             } finally {
-                // can deal if is is null
+                // can deal if it is null
                 IOHelper.close(is);
             }
         }
@@ -733,7 +733,6 @@ public abstract class XQueryBuilder implements Expression, Predicate, NamespaceA
         }
     }
 
-    @SuppressWarnings("unchecked")
     protected Item getAsParameter(Object value) {
         if (value instanceof String) {
             return new StringValue((String) value);
@@ -748,7 +747,7 @@ public abstract class XQueryBuilder implements Expression, Predicate, NamespaceA
         } else if (value instanceof Float) {
             return FloatValue.makeFloatValue((float) value);
         } else {
-            return new ObjectValue(value);
+            return new ObjectValue<>(value);
         }
     }
 
diff --git a/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaEndpointConfigurer.java b/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaEndpointConfigurer.java
index 293844d3228..184b9bbdcf7 100644
--- a/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaEndpointConfigurer.java
+++ b/components/camel-seda/src/generated/java/org/apache/camel/component/seda/SedaEndpointConfigurer.java
@@ -138,5 +138,13 @@ public class SedaEndpointConfigurer extends PropertyConfigurerSupport implements
         default: return null;
         }
     }
+
+    @Override
+    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "queue": return org.apache.camel.Exchange.class;
+        default: return null;
+        }
+    }
 }
 
diff --git a/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json b/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
index e88405fcb57..26ca6914a4d 100644
--- a/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
+++ b/components/camel-seda/src/generated/resources/org/apache/camel/component/seda/seda.json
@@ -52,6 +52,6 @@
     "timeout": { "index": 15, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value." },
     "waitForTaskToComplete": { "index": 16, "kind": "parameter", "displayName": "Wait For Task To Complete", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.WaitForTaskToComplete", "enum": [ "Never", "IfReplyExpected", "Always" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "IfReplyExpected", "description": "Option to specify whether the caller should wait for the async task to complete or not befo [...]
     "lazyStartProducer": { "index": 17, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
-    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
+    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue<org.apache.camel.Exchange>", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
   }
 }
diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index 0d1ff981023..f1934eb03e1 100644
--- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -70,7 +70,7 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
     @Metadata(required = true)
     private String name;
     @UriParam(label = "advanced", description = "Define the queue instance which will be used by the endpoint")
-    private BlockingQueue queue;
+    private BlockingQueue<Exchange> queue;
     @UriParam(defaultValue = "" + SedaConstants.QUEUE_SIZE)
     private int size = SedaConstants.QUEUE_SIZE;
 
diff --git a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpOIDPoller.java b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpOIDPoller.java
index 0296d16106a..f93017024ca 100644
--- a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpOIDPoller.java
+++ b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpOIDPoller.java
@@ -49,7 +49,7 @@ public class SnmpOIDPoller extends ScheduledPollConsumer implements ResponseList
 
     private Target target;
     private PDU pdu;
-    private SnmpEndpoint endpoint;
+    private final SnmpEndpoint endpoint;
 
     public SnmpOIDPoller(SnmpEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
@@ -114,9 +114,8 @@ public class SnmpOIDPoller extends ScheduledPollConsumer implements ResponseList
         } else {
             TreeUtils treeUtils = new TreeUtils(snmp, new DefaultPDUFactory());
             for (OID oid : this.endpoint.getOids()) {
-                List events = treeUtils.getSubtree(target, new OID(oid));
-                for (Object eventObj : events) {
-                    TreeEvent event = (TreeEvent) eventObj;
+                List<TreeEvent> events = treeUtils.getSubtree(target, new OID(oid));
+                for (TreeEvent event : events) {
                     if (event == null) {
                         LOG.warn("Event is null");
                         continue;
diff --git a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapConsumer.java b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapConsumer.java
index 8a07b8e5b0c..297dac6f3ba 100644
--- a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapConsumer.java
+++ b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapConsumer.java
@@ -40,9 +40,7 @@ public class SnmpTrapConsumer extends DefaultConsumer implements CommandResponde
 
     private static final Logger LOG = LoggerFactory.getLogger(SnmpTrapConsumer.class);
 
-    private SnmpEndpoint endpoint;
-    private Address listenGenericAddress;
-    private Snmp snmp;
+    private final SnmpEndpoint endpoint;
     private TransportMapping<? extends Address> transport;
 
     public SnmpTrapConsumer(SnmpEndpoint endpoint, Processor processor) {
@@ -59,19 +57,19 @@ public class SnmpTrapConsumer extends DefaultConsumer implements CommandResponde
             LOG.info("Starting trap consumer on {}", this.endpoint.getAddress());
         }
 
-        this.listenGenericAddress = GenericAddress.parse(this.endpoint.getAddress());
+        Address listenGenericAddress = GenericAddress.parse(this.endpoint.getAddress());
 
         // either tcp or udp
         if ("tcp".equals(endpoint.getProtocol())) {
-            this.transport = new DefaultTcpTransportMapping((TcpAddress) this.listenGenericAddress);
+            this.transport = new DefaultTcpTransportMapping((TcpAddress) listenGenericAddress);
         } else if ("udp".equals(endpoint.getProtocol())) {
-            this.transport = new DefaultUdpTransportMapping((UdpAddress) this.listenGenericAddress);
+            this.transport = new DefaultUdpTransportMapping((UdpAddress) listenGenericAddress);
         } else {
             throw new IllegalArgumentException("Unknown protocol: " + endpoint.getProtocol());
         }
 
-        this.snmp = new Snmp(transport);
-        this.snmp.addCommandResponder(this);
+        Snmp snmp = new Snmp(transport);
+        snmp.addCommandResponder(this);
 
         // listen to the transport
         if (LOG.isDebugEnabled()) {
@@ -112,7 +110,7 @@ public class SnmpTrapConsumer extends DefaultConsumer implements CommandResponde
                 pdu.setErrorStatus(0);
                 pdu.setType(PDU.RESPONSE);
                 StatusInformation statusInformation = new StatusInformation();
-                StateReference ref = event.getStateReference();
+                StateReference<?> ref = event.getStateReference();
                 try {
                     event.getMessageDispatcher().returnResponsePdu(event.getMessageProcessingModel(),
                             event.getSecurityModel(),
diff --git a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapProducer.java b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapProducer.java
index 265379ceab9..9a8016f0608 100644
--- a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapProducer.java
+++ b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpTrapProducer.java
@@ -40,7 +40,7 @@ public class SnmpTrapProducer extends DefaultProducer {
 
     private static final Logger LOG = LoggerFactory.getLogger(SnmpTrapProducer.class);
 
-    private SnmpEndpoint endpoint;
+    private final SnmpEndpoint endpoint;
 
     private Address targetAddress;
     private USM usm;
diff --git a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/DefaultListenerContainerFactory.java b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/DefaultListenerContainerFactory.java
index c1ad5da2c49..b20feab740f 100644
--- a/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/DefaultListenerContainerFactory.java
+++ b/components/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/DefaultListenerContainerFactory.java
@@ -69,7 +69,7 @@ public class DefaultListenerContainerFactory implements ListenerContainerFactory
             // use a custom
             listener.setAdviceChain(endpoint.getRetry());
         } else {
-            RetryInterceptorBuilder builder = RetryInterceptorBuilder.stateless();
+            RetryInterceptorBuilder<?, ?> builder = RetryInterceptorBuilder.stateless();
             if (endpoint.getMaximumRetryAttempts() > 0) {
                 builder.retryPolicy(new SimpleRetryPolicy(endpoint.getMaximumRetryAttempts()));
             }
diff --git a/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisComponentConfigurer.java b/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisComponentConfigurer.java
index 8e98244962d..4d1cc4e6c4f 100644
--- a/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisComponentConfigurer.java
+++ b/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisComponentConfigurer.java
@@ -68,5 +68,14 @@ public class RedisComponentConfigurer extends PropertyConfigurerSupport implemen
         default: return null;
         }
     }
+
+    @Override
+    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "redistemplate":
+        case "redisTemplate": return java.lang.Object.class;
+        default: return null;
+        }
+    }
 }
 
diff --git a/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisEndpointConfigurer.java b/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisEndpointConfigurer.java
index 3c664dff81a..05ae71ab963 100644
--- a/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisEndpointConfigurer.java
+++ b/components/camel-spring-redis/src/generated/java/org/apache/camel/component/redis/RedisEndpointConfigurer.java
@@ -90,5 +90,15 @@ public class RedisEndpointConfigurer extends PropertyConfigurerSupport implement
         default: return null;
         }
     }
+
+    @Override
+    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "redistemplate":
+        case "redisTemplate": return java.lang.Object.class;
+        case "serializer": return java.lang.Object.class;
+        default: return null;
+        }
+    }
 }
 
diff --git a/components/camel-spring-redis/src/generated/resources/org/apache/camel/component/redis/spring-redis.json b/components/camel-spring-redis/src/generated/resources/org/apache/camel/component/redis/spring-redis.json
index dc2ba9fd0a7..091832943e3 100644
--- a/components/camel-spring-redis/src/generated/resources/org/apache/camel/component/redis/spring-redis.json
+++ b/components/camel-spring-redis/src/generated/resources/org/apache/camel/component/redis/spring-redis.json
@@ -22,7 +22,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "redisTemplate": { "index": 0, "kind": "property", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate", "deprecated": false, "autowired": true, "secret": false, "description": "Reference to a pre-configured RedisTemplate instance to use." },
+    "redisTemplate": { "index": 0, "kind": "property", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate<java.lang.Object, java.lang.Object>", "deprecated": false, "autowired": true, "secret": false, "description": "Reference to a pre-configured RedisTemplate instance to use." },
     "bridgeErrorHandler": { "index": 1, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...]
     "lazyStartProducer": { "index": 2, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
     "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
@@ -64,8 +64,8 @@
     "channels": { "index": 2, "kind": "parameter", "displayName": "Channels", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "List of topic names or name patterns to subscribe to. Multiple names can be separated by comma." },
     "command": { "index": 3, "kind": "parameter", "displayName": "Command", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.redis.Command", "enum": [ "PING", "SET", "GET", "QUIT", "EXISTS", "DEL", "TYPE", "FLUSHDB", "KEYS", "RANDOMKEY", "RENAME", "RENAMENX", "RENAMEX", "DBSIZE", "EXPIRE", "EXPIREAT", "TTL", "SELECT", "MOVE", "FLUSHALL", "GETSET", "MGET", "SETNX", "SETEX", "MSET", "MSETNX", "DECRBY", "DECR", "INCRBY", "INCR", "A [...]
     "connectionFactory": { "index": 4, "kind": "parameter", "displayName": "Connection Factory", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.connection.RedisConnectionFactory", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisConnectionFactory ins [...]
-    "redisTemplate": { "index": 5, "kind": "parameter", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisTemplate instance to use." },
-    "serializer": { "index": 6, "kind": "parameter", "displayName": "Serializer", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.serializer.RedisSerializer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisSerializer instance to use." },
+    "redisTemplate": { "index": 5, "kind": "parameter", "displayName": "Redis Template", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.core.RedisTemplate<java.lang.Object, java.lang.Object>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisTemplate [...]
+    "serializer": { "index": 6, "kind": "parameter", "displayName": "Serializer", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.springframework.data.redis.serializer.RedisSerializer<java.lang.Object>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.redis.RedisConfiguration", "configurationField": "configuration", "description": "Reference to a pre-configured RedisSerializer instance to use." },
     "bridgeErrorHandler": { "index": 7, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the lik [...]
     "exceptionHandler": { "index": 8, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...]
     "exchangePattern": { "index": 9, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
index edb8ce7f099..67201510dcb 100644
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisComponent.java
@@ -31,7 +31,7 @@ import org.springframework.data.redis.core.RedisTemplate;
 public class RedisComponent extends DefaultComponent {
 
     @Metadata(autowired = true)
-    private RedisTemplate redisTemplate;
+    private RedisTemplate<?, ?> redisTemplate;
 
     public RedisComponent() {
     }
@@ -57,14 +57,14 @@ public class RedisComponent extends DefaultComponent {
         }
     }
 
-    public RedisTemplate getRedisTemplate() {
+    public RedisTemplate<?, ?> getRedisTemplate() {
         return redisTemplate;
     }
 
     /**
      * Reference to a pre-configured RedisTemplate instance to use.
      */
-    public void setRedisTemplate(RedisTemplate redisTemplate) {
+    public void setRedisTemplate(RedisTemplate<?, ?> redisTemplate) {
         this.redisTemplate = redisTemplate;
     }
 }
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
index 417da7b1625..cfb72db8b32 100644
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConfiguration.java
@@ -43,13 +43,13 @@ public class RedisConfiguration {
     @UriParam
     private String channels;
     @UriParam
-    private RedisTemplate redisTemplate;
+    private RedisTemplate<?, ?> redisTemplate;
     @UriParam(label = "consumer,advanced")
     private RedisMessageListenerContainer listenerContainer;
     @UriParam
     private RedisConnectionFactory connectionFactory;
     @UriParam
-    private RedisSerializer serializer;
+    private RedisSerializer<?> serializer;
 
     public Command getCommand() {
         return command;
@@ -86,14 +86,14 @@ public class RedisConfiguration {
         this.host = host;
     }
 
-    public RedisTemplate getRedisTemplate() {
+    public RedisTemplate<?, ?> getRedisTemplate() {
         return redisTemplate != null ? redisTemplate : createDefaultTemplate();
     }
 
     /**
      * Reference to a pre-configured RedisTemplate instance to use.
      */
-    public void setRedisTemplate(RedisTemplate redisTemplate) {
+    public void setRedisTemplate(RedisTemplate<?, ?> redisTemplate) {
         this.redisTemplate = redisTemplate;
     }
 
@@ -130,14 +130,14 @@ public class RedisConfiguration {
         return connectionFactory != null ? connectionFactory : createDefaultConnectionFactory();
     }
 
-    public RedisSerializer getSerializer() {
+    public RedisSerializer<?> getSerializer() {
         return serializer != null ? serializer : createDefaultSerializer();
     }
 
     /**
      * Reference to a pre-configured RedisSerializer instance to use.
      */
-    public void setSerializer(RedisSerializer serializer) {
+    public void setSerializer(RedisSerializer<?> serializer) {
         this.serializer = serializer;
     }
 
@@ -156,8 +156,8 @@ public class RedisConfiguration {
         return jedisConnectionFactory;
     }
 
-    private RedisTemplate createDefaultTemplate() {
-        redisTemplate = new RedisTemplate();
+    private RedisTemplate<?, ?> createDefaultTemplate() {
+        redisTemplate = new RedisTemplate<>();
         redisTemplate.setDefaultSerializer(getSerializer());
         redisTemplate.setConnectionFactory(getConnectionFactory());
         redisTemplate.afterPropertiesSet();
@@ -173,7 +173,7 @@ public class RedisConfiguration {
         return listenerContainer;
     }
 
-    private RedisSerializer createDefaultSerializer() {
+    private RedisSerializer<?> createDefaultSerializer() {
         serializer = new JdkSerializationRedisSerializer();
         return serializer;
     }
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
index 17ac38246d5..485f77f1103 100644
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisEndpoint.java
@@ -23,6 +23,7 @@ import org.apache.camel.Producer;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.DefaultEndpoint;
+import org.springframework.data.redis.core.RedisTemplate;
 
 /**
  * Send and receive messages from Redis.
@@ -46,8 +47,10 @@ public class RedisEndpoint extends DefaultEndpoint {
             defaultCommand = Command.SET;
         }
 
+        @SuppressWarnings("unchecked")
+        RedisTemplate<String, Object> redisTemplate = (RedisTemplate<String, Object>) configuration.getRedisTemplate();
         return new RedisProducer(
-                this, RedisConstants.COMMAND, defaultCommand.name(), new RedisClient(configuration.getRedisTemplate()));
+                this, RedisConstants.COMMAND, defaultCommand.name(), new RedisClient(redisTemplate));
     }
 
     @Override
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
index 365ac99513e..9f9f869150d 100644
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
@@ -40,8 +40,7 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
 
     public RedisIdempotentRepository(String processorName) {
         redisConfiguration = new RedisConfiguration();
-        RedisTemplate<String, String> redisTemplate = redisConfiguration.getRedisTemplate();
-        this.redisTemplate = redisTemplate;
+        this.redisTemplate = (RedisTemplate<String, String>) redisConfiguration.getRedisTemplate();
         this.setOperations = redisTemplate.opsForSet();
         redisTemplate.getConnectionFactory().getConnection().flushDb();
         this.processorName = processorName;
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java
index a2f529c5d39..4435559b871 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java
@@ -465,8 +465,8 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint {
     public List<?> queryForList(ResultSet rs, boolean allowMapToClass) throws SQLException {
         if (allowMapToClass && outputClass != null) {
             Class<?> outputClazz = getCamelContext().getClassResolver().resolveClass(outputClass);
-            RowMapper rowMapper = rowMapperFactory.newBeanRowMapper(outputClazz);
-            RowMapperResultSetExtractor<?> mapper = new RowMapperResultSetExtractor(rowMapper);
+            RowMapper<?> rowMapper = rowMapperFactory.newBeanRowMapper(outputClazz);
+            RowMapperResultSetExtractor<?> mapper = new RowMapperResultSetExtractor<>(rowMapper);
             return mapper.extractData(rs);
         } else {
             RowMapper rowMapper = rowMapperFactory.newColumnRowMapper();
@@ -475,7 +475,6 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint {
         }
     }
 
-    @SuppressWarnings("unchecked")
     public Object queryForObject(ResultSet rs) throws SQLException {
         Object result = null;
         if (outputClass == null) {
@@ -497,8 +496,8 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint {
             }
         } else {
             Class<?> outputClzz = getCamelContext().getClassResolver().resolveClass(outputClass);
-            RowMapper rowMapper = rowMapperFactory.newBeanRowMapper(outputClzz);
-            RowMapperResultSetExtractor<?> mapper = new RowMapperResultSetExtractor(rowMapper);
+            RowMapper<?> rowMapper = rowMapperFactory.newBeanRowMapper(outputClzz);
+            RowMapperResultSetExtractor<?> mapper = new RowMapperResultSetExtractor<>(rowMapper);
             List<?> data = mapper.extractData(rs);
             if (data.size() > 1) {
                 throw new SQLDataException(
@@ -512,14 +511,13 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint {
         return result;
     }
 
-    @SuppressWarnings("unchecked")
     public ResultSetIterator queryForStreamList(Connection connection, Statement statement, ResultSet rs) throws SQLException {
         if (outputClass == null) {
-            RowMapper rowMapper = rowMapperFactory.newColumnRowMapper();
+            RowMapper<?> rowMapper = rowMapperFactory.newColumnRowMapper();
             return new ResultSetIterator(connection, statement, rs, rowMapper);
         } else {
             Class<?> outputClzz = getCamelContext().getClassResolver().resolveClass(outputClass);
-            RowMapper rowMapper = rowMapperFactory.newBeanRowMapper(outputClzz);
+            RowMapper<?> rowMapper = rowMapperFactory.newBeanRowMapper(outputClzz);
             return new ResultSetIterator(connection, statement, rs, rowMapper);
         }
     }
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlPrepareStatementStrategy.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlPrepareStatementStrategy.java
index 136c972535c..143ad54e3b4 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlPrepareStatementStrategy.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlPrepareStatementStrategy.java
@@ -71,7 +71,7 @@ public class DefaultSqlPrepareStatementStrategy implements SqlPrepareStatementSt
                     String found = matcher.group(1);
                     Object parameter = lookupParameter(found, exchange, exchange.getIn().getBody());
                     if (parameter != null) {
-                        Iterator it = createInParameterIterator(parameter);
+                        Iterator<?> it = createInParameterIterator(parameter);
                         StringJoiner replaceBuilder = new StringJoiner(",");
                         while (it.hasNext()) {
                             it.next();
@@ -184,8 +184,7 @@ public class DefaultSqlPrepareStatementStrategy implements SqlPrepareStatementSt
             Object value = iterator.next();
 
             // special for SQL IN where we need to set dynamic number of values
-            if (value instanceof CompositeIterator) {
-                Iterator it = (Iterator) value;
+            if (value instanceof CompositeIterator<?> it) {
                 while (it.hasNext()) {
                     Object val = it.next();
                     LOG.trace("Setting parameter #{} with value: {}", argNumber, val);
@@ -297,8 +296,8 @@ public class DefaultSqlPrepareStatementStrategy implements SqlPrepareStatementSt
     }
 
     @SuppressWarnings("unchecked")
-    protected static CompositeIterator createInParameterIterator(Object value) {
-        Iterator it;
+    protected static CompositeIterator<?> createInParameterIterator(Object value) {
+        Iterator<?> it;
         // if the body is a String then honor quotes etc.
         if (value instanceof String) {
             String[] tokens = StringQuoteHelper.splitSafeQuote((String) value, ',', true);
@@ -307,7 +306,7 @@ public class DefaultSqlPrepareStatementStrategy implements SqlPrepareStatementSt
         } else {
             it = ObjectHelper.createIterator(value, null);
         }
-        CompositeIterator ci = new CompositeIterator();
+        CompositeIterator ci = new CompositeIterator<>();
         ci.add(it);
         return ci;
     }
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/ResultSetIterator.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/ResultSetIterator.java
index f60745200b5..126eb3e0997 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/ResultSetIterator.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/ResultSetIterator.java
@@ -30,19 +30,19 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.jdbc.core.RowMapper;
 
-public class ResultSetIterator implements Iterator, Closeable {
+public class ResultSetIterator implements Iterator<Object>, Closeable {
 
     private static final Logger LOG = LoggerFactory.getLogger(ResultSetIterator.class);
 
     private final Connection connection;
     private final Statement statement;
     private final ResultSet resultSet;
-    private final RowMapper rowMapper;
+    private final RowMapper<?> rowMapper;
     private final AtomicBoolean closed = new AtomicBoolean();
     private int rowNum;
 
     public ResultSetIterator(Connection connection, Statement statement, ResultSet resultSet,
-                             RowMapper rowMapper) throws SQLException {
+                             RowMapper<?> rowMapper) throws SQLException {
         this.connection = connection;
         this.statement = statement;
         this.resultSet = resultSet;
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/BatchCallableStatementCreatorFactory.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/BatchCallableStatementCreatorFactory.java
index ddeefed09a2..2560d0016a4 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/BatchCallableStatementCreatorFactory.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/BatchCallableStatementCreatorFactory.java
@@ -43,7 +43,7 @@ public class BatchCallableStatementCreatorFactory {
         this.callableStatementCreatorFactory = new CallableStatementCreatorFactory(formatSql(), createParams());
     }
 
-    public void addParameter(CallableStatement callableStatement, Map batchRow) throws SQLException {
+    public void addParameter(CallableStatement callableStatement, Map<String, ?> batchRow) throws SQLException {
         int i = 1;
         for (SqlParameter parameter : getSqlParameterList()) {
             StatementCreatorUtils.setParameterValue(callableStatement, i, parameter, batchRow.get(parameter.getName()));
@@ -72,8 +72,7 @@ public class BatchCallableStatementCreatorFactory {
         List<SqlParameter> params = new ArrayList<>();
 
         for (Object parameter : template.getParameterList()) {
-            if (parameter instanceof InParameter) {
-                InParameter inputParameter = (InParameter) parameter;
+            if (parameter instanceof InParameter inputParameter) {
 
                 SqlParameter sqlParameter;
                 if (inputParameter.getScale() != null) {
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/CallableStatementWrapper.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/CallableStatementWrapper.java
index 68a3e75e9ca..6a2fa6542ae 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/CallableStatementWrapper.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/CallableStatementWrapper.java
@@ -37,7 +37,7 @@ public class CallableStatementWrapper implements StatementWrapper {
 
     final String template;
 
-    Map result;
+    Map<String, Object> result;
 
     List<Map<String, ?>> batchItems;
 
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/TemplateStoredProcedure.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/TemplateStoredProcedure.java
index e9637d9d320..88db7d84370 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/TemplateStoredProcedure.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/TemplateStoredProcedure.java
@@ -40,8 +40,8 @@ public class TemplateStoredProcedure extends StoredProcedure {
 
     private final Template template;
 
-    private List<InParameter> inParameterList = new ArrayList<>();
-    private List<InOutParameter> inOutParameterList = new ArrayList<>();
+    private final List<InParameter> inParameterList = new ArrayList<>();
+    private final List<InOutParameter> inOutParameterList = new ArrayList<>();
 
     public TemplateStoredProcedure(JdbcTemplate jdbcTemplate, Template template, boolean function) {
         setJdbcTemplate(jdbcTemplate);
@@ -50,8 +50,7 @@ public class TemplateStoredProcedure extends StoredProcedure {
         setSql(template.getProcedureName());
 
         for (Object parameter : template.getParameterList()) {
-            if (parameter instanceof InParameter) {
-                InParameter inputParameter = (InParameter) parameter;
+            if (parameter instanceof InParameter inputParameter) {
                 SqlParameter sqlParameter;
                 if (inputParameter.getScale() != null) {
                     sqlParameter = new SqlParameter(
@@ -65,8 +64,7 @@ public class TemplateStoredProcedure extends StoredProcedure {
 
                 declareParameter(sqlParameter);
                 inParameterList.add(inputParameter);
-            } else if (parameter instanceof InOutParameter) {
-                InOutParameter inOutParameter = (InOutParameter) parameter;
+            } else if (parameter instanceof InOutParameter inOutParameter) {
                 SqlInOutParameter sqlInOutParameter;
                 if (inOutParameter.getScale() != null) {
                     sqlInOutParameter = new SqlInOutParameter(
@@ -80,8 +78,7 @@ public class TemplateStoredProcedure extends StoredProcedure {
 
                 declareParameter(sqlInOutParameter);
                 inOutParameterList.add(inOutParameter);
-            } else if (parameter instanceof OutParameter) {
-                OutParameter outParameter = (OutParameter) parameter;
+            } else if (parameter instanceof OutParameter outParameter) {
                 SqlOutParameter sqlOutParameter;
                 if (outParameter.getScale() != null) {
                     sqlOutParameter = new SqlOutParameter(
@@ -101,7 +98,7 @@ public class TemplateStoredProcedure extends StoredProcedure {
         compile();
     }
 
-    public Map execute(Exchange exchange, Object rowData) {
+    public Map<String, Object> execute(Exchange exchange, Object rowData) {
         Map<String, Object> params = new HashMap<>();
 
         for (InParameter inParameter : inParameterList) {
diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/ast/ParseHelper.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/ast/ParseHelper.java
index 841b6e2586e..3910011ec61 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/ast/ParseHelper.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/template/ast/ParseHelper.java
@@ -34,7 +34,7 @@ public final class ParseHelper {
 
         String sqlType = sqlTypeToken.toString();
 
-        //if number then use it(probably Vendor spesific SQL-type)
+        // if number, then use it(probably Vendor specific SQL-type)
         if (sqlTypeToken.kind == SSPTParserConstants.NUMBER) {
             return Integer.parseInt(sqlType);
         }
@@ -50,7 +50,7 @@ public final class ParseHelper {
                 throw new ParseRuntimeException("Failed to parse class.field:" + sqlType);
             }
             try {
-                Class clazz = classResolver.resolveMandatoryClass(className);
+                Class<?> clazz = classResolver.resolveMandatoryClass(className);
                 return getFieldInt(clazz, fieldName);
             } catch (ClassNotFoundException e) {
                 throw new ParseRuntimeException("Class for " + className + " not found", e);
@@ -70,7 +70,7 @@ public final class ParseHelper {
         }
     }
 
-    private static int getFieldInt(Class clazz, String sqlType) {
+    private static int getFieldInt(Class<?> clazz, String sqlType) {
         Field field = ReflectionUtils.findField(clazz, sqlType);
         if (field == null) {
             throw new ParseRuntimeException("Field " + sqlType + " not found from " + clazz.getName());
diff --git a/components/camel-stub/src/generated/resources/org/apache/camel/component/stub/stub.json b/components/camel-stub/src/generated/resources/org/apache/camel/component/stub/stub.json
index 53a56f8a7ae..3facd275f3c 100644
--- a/components/camel-stub/src/generated/resources/org/apache/camel/component/stub/stub.json
+++ b/components/camel-stub/src/generated/resources/org/apache/camel/component/stub/stub.json
@@ -53,6 +53,6 @@
     "timeout": { "index": 15, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "producer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "30000", "description": "Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value." },
     "waitForTaskToComplete": { "index": 16, "kind": "parameter", "displayName": "Wait For Task To Complete", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.WaitForTaskToComplete", "enum": [ "Never", "IfReplyExpected", "Always" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "IfReplyExpected", "description": "Option to specify whether the caller should wait for the async task to complete or not befo [...]
     "lazyStartProducer": { "index": 17, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
-    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
+    "queue": { "index": 18, "kind": "parameter", "displayName": "Queue", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.BlockingQueue<org.apache.camel.Exchange>", "deprecated": false, "autowired": false, "secret": false, "description": "Define the queue instance which will be used by the endpoint" }
   }
 }
diff --git a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelAnnotationsHandler.java b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelAnnotationsHandler.java
index 74372872fed..70a05178f20 100644
--- a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelAnnotationsHandler.java
+++ b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelAnnotationsHandler.java
@@ -137,7 +137,9 @@ public final class CamelAnnotationsHandler {
         }
     }
 
-    public static void handleRouteCoverageDump(ConfigurableApplicationContext context, Class<?> testClass, Function testMethod)
+    public static void handleRouteCoverageDump(
+            ConfigurableApplicationContext context, Class<?> testClass,
+            Function<CamelSpringTestHelper.DoToSpringCamelContextsStrategy, String> testMethod)
             throws Exception {
         if (testClass.isAnnotationPresent(EnableRouteCoverage.class)) {
             CamelSpringTestHelper.doToSpringCamelContexts(context, new CamelSpringTestHelper.DoToSpringCamelContextsStrategy() {
@@ -146,7 +148,7 @@ public final class CamelAnnotationsHandler {
                 public void execute(String contextName, SpringCamelContext camelContext) throws Exception {
                     LOGGER.debug("Dumping RouteCoverage");
 
-                    String testMethodName = (String) testMethod.apply(this);
+                    String testMethodName = testMethod.apply(this);
                     RouteCoverageDumper.dumpRouteCoverage(camelContext, testClass.getName(), testMethodName);
 
                     // reset JMX statistics
@@ -361,8 +363,7 @@ public final class CamelAnnotationsHandler {
             context.addBeanFactoryPostProcessor(beanFactory -> beanFactory.addBeanPostProcessor(new BeanPostProcessor() {
                 @Override
                 public Object postProcessBeforeInitialization(Object bean, String beanName) {
-                    if (bean instanceof PropertiesComponent) {
-                        PropertiesComponent pc = (PropertiesComponent) bean;
+                    if (bean instanceof PropertiesComponent pc) {
                         LOGGER.info("Using {} properties to override any existing properties on the PropertiesComponent",
                                 extra.size());
                         pc.setOverrideProperties(extra);
@@ -396,17 +397,12 @@ public final class CamelAnnotationsHandler {
         }
 
         if (!skip) {
-            CamelSpringTestHelper.doToSpringCamelContexts(context, new CamelSpringTestHelper.DoToSpringCamelContextsStrategy() {
-                public void execute(
-                        String contextName,
-                        SpringCamelContext camelContext)
-                        throws Exception {
-                    if (!camelContext.isStarted()) {
-                        LOGGER.info("Starting CamelContext with name [{}].", contextName);
-                        camelContext.start();
-                    } else {
-                        LOGGER.debug("CamelContext with name [{}] already started.", contextName);
-                    }
+            CamelSpringTestHelper.doToSpringCamelContexts(context, (contextName, camelContext) -> {
+                if (!camelContext.isStarted()) {
+                    LOGGER.info("Starting CamelContext with name [{}].", contextName);
+                    camelContext.start();
+                } else {
+                    LOGGER.debug("CamelContext with name [{}] already started.", contextName);
                 }
             });
         }
diff --git a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelSpringTestHelper.java b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelSpringTestHelper.java
index cbabded9cdc..546dfec0d36 100644
--- a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelSpringTestHelper.java
+++ b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelSpringTestHelper.java
@@ -109,6 +109,7 @@ public final class CamelSpringTestHelper {
         }
     }
 
+    @FunctionalInterface
     public interface DoToSpringCamelContextsStrategy {
         void execute(String contextName, SpringCamelContext camelContext) throws Exception;
     }
diff --git a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/RouteCoverageEventNotifier.java b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/RouteCoverageEventNotifier.java
index 36423239c01..664d272332f 100644
--- a/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/RouteCoverageEventNotifier.java
+++ b/components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/RouteCoverageEventNotifier.java
@@ -26,9 +26,9 @@ import org.apache.camel.support.EventNotifierSupport;
 public class RouteCoverageEventNotifier extends EventNotifierSupport {
 
     private final String testClassName;
-    private final Function testMethodName;
+    private final Function<RouteCoverageEventNotifier, String> testMethodName;
 
-    public RouteCoverageEventNotifier(String testClassName, Function testMethodName) {
+    public RouteCoverageEventNotifier(String testClassName, Function<RouteCoverageEventNotifier, String> testMethodName) {
         this.testClassName = testClassName;
         this.testMethodName = testMethodName;
         setIgnoreCamelContextEvents(false);
@@ -43,7 +43,7 @@ public class RouteCoverageEventNotifier extends EventNotifierSupport {
     @Override
     public void notify(CamelEvent event) throws Exception {
         CamelContext context = ((CamelContextStoppingEvent) event).getContext();
-        String testName = (String) testMethodName.apply(this);
+        String testName = testMethodName.apply(this);
         RouteCoverageDumper.dumpRouteCoverage(context, testClassName, testName);
     }
 
diff --git a/components/camel-undertow-spring-security/src/test/java/org/apache/camel/component/spring/security/AbstractSpringSecurityBearerTokenTest.java b/components/camel-undertow-spring-security/src/test/java/org/apache/camel/component/spring/security/AbstractSpringSecurityBearerTokenTest.java
index 9dec55ad02d..ea16fbbd537 100644
--- a/components/camel-undertow-spring-security/src/test/java/org/apache/camel/component/spring/security/AbstractSpringSecurityBearerTokenTest.java
+++ b/components/camel-undertow-spring-security/src/test/java/org/apache/camel/component/spring/security/AbstractSpringSecurityBearerTokenTest.java
@@ -90,7 +90,7 @@ public abstract class AbstractSpringSecurityBearerTokenTest extends CamelTestSup
 
         PlainJWT plainJWT = new PlainJWT(claimsSet.build());
 
-        Map<String, Object> headers = new HashMap();
+        Map<String, Object> headers = new HashMap<>();
         headers.put("type", "JWT");
         headers.put("alg", "RS256");
         Map<String, Object> claims = new KeycloakUsernameSubClaimAdapter("preffered_name").convert(claimsSet.getClaims());
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
index 2129b12fa54..16efda19a92 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
@@ -65,7 +65,7 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
 
     private static final Logger LOG = LoggerFactory.getLogger(UndertowEndpoint.class);
 
-    private UndertowComponent component;
+    private final UndertowComponent component;
     private SSLContext sslContext;
     private OptionMap optionMap;
     private HttpHandlerRegistrationInfo registrationInfo;
@@ -533,7 +533,7 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
             ServiceLoader<UndertowSecurityProvider> securityProvider = ServiceLoader.load(UndertowSecurityProvider.class);
 
             Iterator<UndertowSecurityProvider> iter = securityProvider.iterator();
-            List<String> providers = new LinkedList();
+            List<String> providers = new LinkedList<>();
             while (iter.hasNext()) {
                 UndertowSecurityProvider security = iter.next();
                 //only securityProvider, who accepts security configuration, could be used
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/RestRootHandler.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/RestRootHandler.java
index 18fdfdc2b85..10f498b67fc 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/RestRootHandler.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/RestRootHandler.java
@@ -118,7 +118,7 @@ public class RestRootHandler implements HttpHandler {
         // use the path as key to find the consumer handler to use
         path = pathAsKey(path);
 
-        List<RestConsumerContextPathMatcher.ConsumerPath> paths = new ArrayList<>();
+        List<RestConsumerContextPathMatcher.ConsumerPath<UndertowConsumer>> paths = new ArrayList<>();
         for (final UndertowConsumer consumer : consumers) {
             paths.add(new RestConsumerPath(consumer));
         }
@@ -136,7 +136,7 @@ public class RestRootHandler implements HttpHandler {
 
                 String consumerPath = consumer.getEndpoint().getHttpURI().getPath();
                 boolean matchOnUriPrefix = consumer.getEndpoint().isMatchOnUriPrefix();
-                // Just make sure the we get the right consumer path first
+                // Just make sure that we get the right consumer path first
                 if (RestConsumerContextPathMatcher.matchPath(path, consumerPath, matchOnUriPrefix)) {
                     candidates.add(consumer);
                 }
diff --git a/components/camel-vertx/camel-vertx-common/src/main/java/org/apache/camel/component/vertx/common/VertxJsonArrayConverter.java b/components/camel-vertx/camel-vertx-common/src/main/java/org/apache/camel/component/vertx/common/VertxJsonArrayConverter.java
index e8ff95b4420..353e5885db8 100644
--- a/components/camel-vertx/camel-vertx-common/src/main/java/org/apache/camel/component/vertx/common/VertxJsonArrayConverter.java
+++ b/components/camel-vertx/camel-vertx-common/src/main/java/org/apache/camel/component/vertx/common/VertxJsonArrayConverter.java
@@ -58,7 +58,7 @@ public final class VertxJsonArrayConverter {
     }
 
     @Converter
-    public static JsonArray toJsonArray(List list) {
+    public static JsonArray toJsonArray(List<?> list) {
         return new JsonArray(list);
     }
 
@@ -89,7 +89,7 @@ public final class VertxJsonArrayConverter {
     }
 
     @Converter
-    public static List toList(JsonArray jsonArray) {
+    public static List<?> toList(JsonArray jsonArray) {
         return jsonArray.getList();
     }
 
diff --git a/components/camel-vertx/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxConsumer.java b/components/camel-vertx/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxConsumer.java
index 55c5a61f528..98eb9a0b037 100644
--- a/components/camel-vertx/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxConsumer.java
+++ b/components/camel-vertx/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxConsumer.java
@@ -32,16 +32,16 @@ public class VertxConsumer extends DefaultConsumer {
     private static final Logger LOG = LoggerFactory.getLogger(VertxConsumer.class);
 
     private final VertxEndpoint endpoint;
-    private transient MessageConsumer messageConsumer;
+    private transient MessageConsumer<?> messageConsumer;
 
-    private Handler<Message<Object>> handler = VertxConsumer.this::onEventBusEvent;
+    private final Handler<Message<Object>> handler = VertxConsumer.this::onEventBusEvent;
 
     public VertxConsumer(VertxEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
         this.endpoint = endpoint;
     }
 
-    protected void onEventBusEvent(final Message event) {
+    protected void onEventBusEvent(final Message<?> event) {
         LOG.debug("onEvent {}", event);
 
         final boolean reply = event.replyAddress() != null;
diff --git a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
index 20708f80047..ecb7bb55fe3 100644
--- a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
+++ b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
@@ -55,7 +55,7 @@ public class Web3jEndpoint extends DefaultEndpoint {
     private String nodeAddress;
 
     @UriParam
-    private Web3jConfiguration configuration;
+    private final Web3jConfiguration configuration;
 
     public Web3jEndpoint(String uri, String remaining, Web3jComponent component, Web3jConfiguration configuration) {
         super(uri, component);
@@ -138,7 +138,7 @@ public class Web3jEndpoint extends DefaultEndpoint {
         return filter;
     }
 
-    private static void addTopics(Filter filter, List<String> topics) {
+    private static void addTopics(Filter<?> filter, List<String> topics) {
         if (topics != null) {
             for (String topic : topics) {
                 if (topic != null && topic.length() > 0) {
diff --git a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
index 86b16274d86..10546afe4c5 100644
--- a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
+++ b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
@@ -96,12 +96,12 @@ import static org.apache.camel.component.web3j.Web3jHelper.toDefaultBlockParamet
 
 public class Web3jProducer extends HeaderSelectorProducer {
     private static final Logger LOG = LoggerFactory.getLogger(Web3jProducer.class);
-    private Web3j web3j;
+    private final Web3j web3j;
     private Quorum quorum;
-    private Web3jConfiguration configuration;
+    private final Web3jConfiguration configuration;
 
     public Web3jProducer(Web3jEndpoint endpoint, final Web3jConfiguration configuration) {
-        super(endpoint, Web3jConstants.OPERATION, () -> configuration.getOperationOrDefault());
+        super(endpoint, Web3jConstants.OPERATION, configuration::getOperationOrDefault);
         web3j = endpoint.getWeb3j();
         this.configuration = configuration;
         if (web3j instanceof Quorum) {
@@ -1109,7 +1109,7 @@ public class Web3jProducer extends HeaderSelectorProducer {
         }
     }
 
-    private void setRequestId(Message message, Request request) {
+    private void setRequestId(Message message, Request<?, ?> request) {
         final Long id = message.getHeader(Web3jConstants.ID, Long.class);
         LOG.debug("setRequestId {}", id);
         if (id != null) {
@@ -1117,7 +1117,7 @@ public class Web3jProducer extends HeaderSelectorProducer {
         }
     }
 
-    private boolean checkForError(Message message, Response response) {
+    private boolean checkForError(Message message, Response<?> response) {
         if (response.hasError()) {
             int code = response.getError().getCode();
             String data = response.getError().getData();
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupListenerSupport.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupListenerSupport.java
index 7c5c384e2a5..3226b6b1dff 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupListenerSupport.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupListenerSupport.java
@@ -19,14 +19,15 @@ package org.apache.camel.component.zookeepermaster;
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.zookeepermaster.group.Group;
 import org.apache.camel.component.zookeepermaster.group.GroupListener;
+import org.apache.camel.component.zookeepermaster.group.NodeState;
 import org.apache.camel.util.IOHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class ZookeeperGroupListenerSupport extends ZookeeperGroupSupport implements GroupListener {
+public class ZookeeperGroupListenerSupport<T extends NodeState> extends ZookeeperGroupSupport<T> implements GroupListener<T> {
 
-    private static final transient Logger LOG = LoggerFactory.getLogger(ZookeeperGroupListenerSupport.class);
-    private Group<CamelNodeState> singleton;
+    private static final Logger LOG = LoggerFactory.getLogger(ZookeeperGroupListenerSupport.class);
+    private Group<T> singleton;
     private final String clusterPath;
     private final Endpoint endpoint;
     private final Runnable onLockAcquired;
@@ -40,7 +41,7 @@ public class ZookeeperGroupListenerSupport extends ZookeeperGroupSupport impleme
         this.onDisconnected = onDisconnected;
     }
 
-    public void updateState(CamelNodeState state) {
+    public void updateState(T state) {
         singleton.update(state);
     }
 
@@ -63,12 +64,12 @@ public class ZookeeperGroupListenerSupport extends ZookeeperGroupSupport impleme
         return clusterPath;
     }
 
-    public Group<CamelNodeState> getGroup() {
+    public Group<T> getGroup() {
         return singleton;
     }
 
     @Override
-    public void groupEvent(Group group, GroupEvent event) {
+    public void groupEvent(Group<T> group, GroupEvent event) {
         switch (event) {
             case CONNECTED:
                 break;
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupSupport.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupSupport.java
index 14215bb5709..66642204905 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupSupport.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/ZookeeperGroupSupport.java
@@ -24,6 +24,7 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.component.zookeepermaster.group.DefaultGroupFactoryStrategy;
 import org.apache.camel.component.zookeepermaster.group.Group;
 import org.apache.camel.component.zookeepermaster.group.ManagedGroupFactory;
+import org.apache.camel.component.zookeepermaster.group.NodeState;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.service.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
@@ -35,10 +36,10 @@ import org.apache.curator.retry.RetryOneTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class ZookeeperGroupSupport extends ServiceSupport
+public class ZookeeperGroupSupport<T extends NodeState> extends ServiceSupport
         implements CamelContextAware, Callable<CuratorFramework>, ConnectionStateListener {
 
-    private static final transient Logger LOG = LoggerFactory.getLogger(ZookeeperComponentSupport.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ZookeeperComponentSupport.class);
 
     private static final String ZOOKEEPER_URL = "zookeeper.url";
     private static final String ZOOKEEPER_PASSWORD = "zookeeper.password";
@@ -78,11 +79,11 @@ public class ZookeeperGroupSupport extends ServiceSupport
         return managedGroupFactory.getCurator();
     }
 
-    public Group<CamelNodeState> createGroup(String path) {
+    public Group<T> createGroup(String path) {
         if (managedGroupFactory == null) {
             throw new IllegalStateException("Component is not started");
         }
-        return managedGroupFactory.createGroup(path, CamelNodeState.class);
+        return (Group<T>) managedGroupFactory.createGroup(path, CamelNodeState.class);
     }
 
     /**
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ChildData.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ChildData.java
index ebef2a539e2..a465fadc162 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ChildData.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ChildData.java
@@ -20,7 +20,7 @@ import java.util.Arrays;
 
 import org.apache.zookeeper.data.Stat;
 
-public class ChildData<T> implements Comparable<ChildData> {
+public class ChildData<T> implements Comparable<ChildData<T>> {
     private final String path;
     private final Stat stat;
     private final byte[] data;
@@ -39,7 +39,7 @@ public class ChildData<T> implements Comparable<ChildData> {
      *             Note: this class has a natural ordering that is inconsistent with equals.
      */
     @Override
-    public int compareTo(ChildData rhs) {
+    public int compareTo(ChildData<T> rhs) {
         if (this == rhs) {
             return 0;
         }
@@ -60,7 +60,8 @@ public class ChildData<T> implements Comparable<ChildData> {
             return false;
         }
 
-        ChildData childData = (ChildData) o;
+        @SuppressWarnings("unchecked")
+        ChildData<T> childData = (ChildData<T>) o;
 
         if (!Arrays.equals(data, childData.data)) {
             return false;
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/CompositeOperation.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/CompositeOperation.java
index de0115d00d7..dfc937ec13f 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/CompositeOperation.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/CompositeOperation.java
@@ -27,7 +27,7 @@ public class CompositeOperation implements Operation {
 
     public static final Logger LOG = LoggerFactory.getLogger(CompositeOperation.class);
 
-    private Operation[] operations;
+    private final Operation[] operations;
 
     public CompositeOperation(Operation... operations) {
         this.operations = operations;
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperGroup.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperGroup.java
index 1d5a156a8db..ef66de283b7 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperGroup.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperGroup.java
@@ -37,7 +37,7 @@ public class DelegateZooKeeperGroup<T extends NodeState> implements Group<T> {
     private final List<GroupListener<T>> listeners;
     private Group<T> group;
     private T state;
-    private AtomicBoolean started = new AtomicBoolean();
+    private final AtomicBoolean started = new AtomicBoolean();
 
     public DelegateZooKeeperGroup(String path, Class<T> clazz) {
         this.listeners = new ArrayList<>();
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperMultiGroup.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperMultiGroup.java
index f9f29f4aea7..9c9680c7596 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperMultiGroup.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/DelegateZooKeeperMultiGroup.java
@@ -36,7 +36,7 @@ public class DelegateZooKeeperMultiGroup<T extends NodeState> extends DelegateZo
     public boolean isMaster(String id) {
         Group<T> group = this.getGroup();
         if (group != null) {
-            return ((MultiGroup) group).isMaster(id);
+            return ((MultiGroup<T>) group).isMaster(id);
         } else {
             return false;
         }
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/EventOperation.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/EventOperation.java
index d124dd80660..9cd46bb7245 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/EventOperation.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/EventOperation.java
@@ -17,12 +17,13 @@
 package org.apache.camel.component.zookeepermaster.group.internal;
 
 import org.apache.camel.component.zookeepermaster.group.GroupListener;
+import org.apache.camel.component.zookeepermaster.group.NodeState;
 
-class EventOperation implements Operation {
-    private final ZooKeeperGroup cache;
+class EventOperation<T extends NodeState> implements Operation {
+    private final ZooKeeperGroup<T> cache;
     private final GroupListener.GroupEvent event;
 
-    EventOperation(ZooKeeperGroup cache, GroupListener.GroupEvent event) {
+    EventOperation(ZooKeeperGroup<T> cache, GroupListener.GroupEvent event) {
         this.cache = cache;
         this.event = event;
     }
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/GetDataOperation.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/GetDataOperation.java
index 6a037999fc8..30b3511098e 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/GetDataOperation.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/GetDataOperation.java
@@ -16,12 +16,14 @@
  */
 package org.apache.camel.component.zookeepermaster.group.internal;
 
-class GetDataOperation implements Operation {
+import org.apache.camel.component.zookeepermaster.group.NodeState;
 
-    private final ZooKeeperGroup cache;
+class GetDataOperation<T extends NodeState> implements Operation {
+
+    private final ZooKeeperGroup<T> cache;
     private final String fullPath;
 
-    GetDataOperation(ZooKeeperGroup cache, String fullPath) {
+    GetDataOperation(ZooKeeperGroup<T> cache, String fullPath) {
         this.cache = cache;
         this.fullPath = fullPath;
     }
@@ -40,7 +42,7 @@ class GetDataOperation implements Operation {
             return false;
         }
 
-        GetDataOperation that = (GetDataOperation) o;
+        GetDataOperation<T> that = (GetDataOperation<T>) o;
 
         if (!fullPath.equals(that.fullPath)) {
             return false;
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/RefreshOperation.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/RefreshOperation.java
index d76941047dc..54d2223643d 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/RefreshOperation.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/RefreshOperation.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.zookeepermaster.group.internal;
 
-class RefreshOperation implements Operation {
-    private final ZooKeeperGroup cache;
+import org.apache.camel.component.zookeepermaster.group.NodeState;
+
+class RefreshOperation<T extends NodeState> implements Operation {
+    private final ZooKeeperGroup<T> cache;
     private final ZooKeeperGroup.RefreshMode mode;
 
-    RefreshOperation(ZooKeeperGroup cache, ZooKeeperGroup.RefreshMode mode) {
+    RefreshOperation(ZooKeeperGroup<T> cache, ZooKeeperGroup.RefreshMode mode) {
         this.cache = cache;
         this.mode = mode;
     }
@@ -39,7 +41,7 @@ class RefreshOperation implements Operation {
             return false;
         }
 
-        RefreshOperation that = (RefreshOperation) o;
+        RefreshOperation<T> that = (RefreshOperation<T>) o;
 
         //noinspection RedundantIfStatement
         if (mode != that.mode) {
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/SequenceComparator.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/SequenceComparator.java
index 451288638ab..734ded1c397 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/SequenceComparator.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/SequenceComparator.java
@@ -18,10 +18,10 @@ package org.apache.camel.component.zookeepermaster.group.internal;
 
 import java.util.Comparator;
 
-public class SequenceComparator implements Comparator<ChildData> {
+public class SequenceComparator<T> implements Comparator<ChildData<T>> {
 
     @Override
-    public int compare(ChildData left, ChildData right) {
+    public int compare(ChildData<T> left, ChildData<T> right) {
         return left.getPath().compareTo(right.getPath());
     }
 }
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/UpdateOperation.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/UpdateOperation.java
index 03fad3b5433..5dc9def4310 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/UpdateOperation.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/UpdateOperation.java
@@ -22,7 +22,7 @@ class UpdateOperation<T extends NodeState> implements Operation {
     private final ZooKeeperGroup<T> cache;
     private final T node;
 
-    UpdateOperation(ZooKeeperGroup cache, T node) {
+    UpdateOperation(ZooKeeperGroup<T> cache, T node) {
         this.cache = cache;
         this.node = node;
     }
diff --git a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ZooKeeperGroup.java b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ZooKeeperGroup.java
index 320e368827c..42f57146837 100644
--- a/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ZooKeeperGroup.java
+++ b/components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/group/internal/ZooKeeperGroup.java
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -39,7 +38,6 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.Collectors;
 
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -88,7 +86,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     private final ConcurrentMap<String, ChildData<T>> currentData = new ConcurrentHashMap<>();
     private final AtomicBoolean started = new AtomicBoolean();
     private final AtomicBoolean connected = new AtomicBoolean();
-    private final SequenceComparator sequenceComparator = new SequenceComparator();
+    private final SequenceComparator<T> sequenceComparator = new SequenceComparator<T>();
     private final String uuid = UUID.randomUUID().toString();
 
     private volatile String id;
@@ -313,7 +311,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     @Override
     public Map<String, T> members() {
         List<ChildData<T>> children = getActiveChildren();
-        Collections.sort(children, sequenceComparator);
+        children.sort(sequenceComparator);
         Map<String, T> members = new LinkedHashMap<>();
         for (ChildData<T> child : children) {
             members.put(child.getPath(), child.getNode());
@@ -324,14 +322,14 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     @Override
     public boolean isMaster() {
         List<ChildData<T>> children = getActiveChildren();
-        Collections.sort(children, sequenceComparator);
+        children.sort(sequenceComparator);
         return !children.isEmpty() && children.get(0).getPath().equals(id);
     }
 
     @Override
     public T master() {
         List<ChildData<T>> children = getActiveChildren();
-        Collections.sort(children, sequenceComparator);
+        children.sort(sequenceComparator);
         if (children.isEmpty()) {
             return null;
         }
@@ -341,7 +339,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     @Override
     public List<T> slaves() {
         List<ChildData<T>> children = getActiveChildren();
-        Collections.sort(children, sequenceComparator);
+        children.sort(sequenceComparator);
         List<T> slaves = new ArrayList<>();
         for (int i = 1; i < children.size(); i++) {
             slaves.add(children.get(i).getNode());
@@ -390,14 +388,14 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
      *
      * @return list of children and data
      */
-    public List<ChildData> getCurrentData() {
+    public List<ChildData<T>> getCurrentData() {
         return new ArrayList<>(currentData.values());
     }
 
     /**
      * Used for testing purpose
      */
-    void putCurrentData(String key, ChildData value) {
+    void putCurrentData(String key, ChildData<T> value) {
         currentData.put(key, value);
     }
 
@@ -408,7 +406,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
      * @param  fullPath full path to the node to check
      * @return          data or null
      */
-    public ChildData getCurrentData(String fullPath) {
+    public ChildData<T> getCurrentData(String fullPath) {
         return currentData.get(fullPath);
     }
 
@@ -454,7 +452,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
         try {
             ensurePath.ensure(client.getZookeeperClient());
             List<String> children = client.getChildren().usingWatcher(childrenWatcher).forPath(path);
-            Collections.sort(children, (String left, String right) -> left.compareTo(right));
+            children.sort((String left, String right) -> left.compareTo(right));
             processChildren(children, mode);
         } catch (Exception e) {
             handleException(e);
@@ -491,7 +489,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     }
 
     protected void remove(String fullPath) {
-        ChildData data = currentData.remove(fullPath);
+        ChildData<T> data = currentData.remove(fullPath);
         if (data != null) {
             offerOperation(new EventOperation(this, GroupListener.GroupEvent.CHANGED));
         }
@@ -523,7 +521,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     }
 
     private void processChildren(List<String> children, RefreshMode mode) throws Exception {
-        List<String> fullPaths = children.stream().map(c -> ZKPaths.makePath(path, c)).collect(Collectors.toList());
+        List<String> fullPaths = children.stream().map(c -> ZKPaths.makePath(path, c)).toList();
 
         Set<String> removedNodes = new HashSet<>(currentData.keySet());
         fullPaths.forEach(removedNodes::remove);
@@ -569,8 +567,7 @@ public class ZooKeeperGroup<T extends NodeState> implements Group<T> {
     }
 
     private byte[] encode(T state) {
-        try {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
             mapper.writeValue(baos, state);
             return baos.toByteArray();
         } catch (IOException e) {
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/CamelInternalProcessorAdvice.java b/core/camel-api/src/main/java/org/apache/camel/spi/CamelInternalProcessorAdvice.java
index 27e7c2dcbdb..d5782b2072d 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/CamelInternalProcessorAdvice.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/CamelInternalProcessorAdvice.java
@@ -19,13 +19,13 @@ package org.apache.camel.spi;
 import org.apache.camel.Exchange;
 
 /**
- * An advice (before and after) to execute cross cutting functionality in the Camel routing engine.
+ * An advice (before and after) to execute cross-cutting functionality in the Camel routing engine.
  * <p/>
  * The Camel routing engine will execute the {@link #before(org.apache.camel.Exchange)} and
  * {@link #after(org.apache.camel.Exchange, Object)} methods during routing in correct order.
  *
  * @param <T>
- * @see       org.apache.camel.processor.CamelInternalProcessor
+ * @see       org.apache.camel.impl.engine.CamelInternalProcessor
  */
 public interface CamelInternalProcessorAdvice<T> {
 
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractDynamicRegistry.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractDynamicRegistry.java
index 7fd96abc8be..4477171f48c 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractDynamicRegistry.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractDynamicRegistry.java
@@ -61,7 +61,7 @@ public class AbstractDynamicRegistry<K, V> extends AbstractMap<K, V> implements
     @Override
     public void start() {
         if (dynamicMap instanceof LRUCache) {
-            ((LRUCache) dynamicMap).resetStatistics();
+            ((LRUCache<K, V>) dynamicMap).resetStatistics();
         }
     }
 
@@ -175,7 +175,7 @@ public class AbstractDynamicRegistry<K, V> extends AbstractMap<K, V> implements
 
     public void cleanUp() {
         if (dynamicMap instanceof LRUCache) {
-            ((LRUCache) dynamicMap).cleanUp();
+            ((LRUCache<K, V>) dynamicMap).cleanUp();
         }
     }
 
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
index e70454c88c4..d46cd4c6a87 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
@@ -171,7 +171,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
 
     @Override
     public <T> T getAdvice(Class<T> type) {
-        for (CamelInternalProcessorAdvice task : advices) {
+        for (CamelInternalProcessorAdvice<?> task : advices) {
             Object advice = unwrap(task);
             if (type.isInstance(advice)) {
                 return type.cast(advice);
@@ -438,7 +438,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     /**
      * Advice to keep the {@link InflightRepository} up to date.
      */
-    public static class RouteInflightRepositoryAdvice implements CamelInternalProcessorAdvice {
+    public static class RouteInflightRepositoryAdvice implements CamelInternalProcessorAdvice<Object> {
 
         private final InflightRepository inflightRepository;
         private final String id;
@@ -468,7 +468,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     /**
      * Advice to execute any {@link RoutePolicy} a route may have been configured with.
      */
-    public static class RoutePolicyAdvice implements CamelInternalProcessorAdvice {
+    public static class RoutePolicyAdvice implements CamelInternalProcessorAdvice<Object> {
 
         private final Logger log = LoggerFactory.getLogger(getClass());
         private final List<RoutePolicy> routePolicies;
@@ -489,8 +489,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
          * @return        <tt>true</tt> to run
          */
         boolean isRoutePolicyRunAllowed(RoutePolicy policy) {
-            if (policy instanceof StatefulService) {
-                StatefulService ss = (StatefulService) policy;
+            if (policy instanceof StatefulService ss) {
                 return ss.isRunAllowed();
             }
             return true;
@@ -902,7 +901,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     /**
      * Advice that stores the node id and label of the processor that is processing the exchange.
      */
-    public static class NodeHistoryAdvice implements CamelInternalProcessorAdvice {
+    public static class NodeHistoryAdvice implements CamelInternalProcessorAdvice<String> {
 
         private final String id;
         private final String label;
@@ -923,7 +922,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
         }
 
         @Override
-        public void after(Exchange exchange, Object data) throws Exception {
+        public void after(Exchange exchange, String data) throws Exception {
             exchange.getExchangeExtension().setHistoryNodeId(null);
             exchange.getExchangeExtension().setHistoryNodeLabel(null);
             exchange.getExchangeExtension().setHistoryNodeSource(null);
@@ -1022,7 +1021,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     /**
      * Advice for delaying
      */
-    public static class DelayerAdvice implements CamelInternalProcessorAdvice {
+    public static class DelayerAdvice implements CamelInternalProcessorAdvice<Object> {
 
         private final Logger log = LoggerFactory.getLogger(getClass());
         private final long delay;
@@ -1058,7 +1057,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     /**
      * Advice for tracing
      */
-    public static class TracingAdvice implements CamelInternalProcessorAdvice {
+    public static class TracingAdvice implements CamelInternalProcessorAdvice<Object> {
 
         private final Tracer tracer;
         private final NamedNode processorDefinition;
@@ -1183,20 +1182,15 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
     }
 
     public static Object unwrap(CamelInternalProcessorAdvice<?> advice) {
-        if (advice instanceof CamelInternalProcessorAdviceWrapper) {
-            return ((CamelInternalProcessorAdviceWrapper) advice).unwrap();
+        if (advice instanceof CamelInternalProcessorAdviceWrapper<?> wrapped) {
+            return wrapped.unwrap();
         } else {
             return advice;
         }
     }
 
-    static class CamelInternalProcessorAdviceWrapper<T> implements CamelInternalProcessorAdvice<T>, Ordered {
-
-        final InstrumentationProcessor<T> instrumentationProcessor;
-
-        public CamelInternalProcessorAdviceWrapper(InstrumentationProcessor<T> instrumentationProcessor) {
-            this.instrumentationProcessor = instrumentationProcessor;
-        }
+    record CamelInternalProcessorAdviceWrapper<T> (
+            InstrumentationProcessor<T> instrumentationProcessor) implements CamelInternalProcessorAdvice<T>, Ordered {
 
         InstrumentationProcessor<T> unwrap() {
             return instrumentationProcessor;
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelBeanPostProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelBeanPostProcessor.java
index 9c0b5e75d0c..f815682ab0d 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelBeanPostProcessor.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelBeanPostProcessor.java
@@ -120,8 +120,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         }
 
         // always do injection of camel context
-        if (bean instanceof CamelContextAware && canSetCamelContext(bean, beanName)) {
-            CamelContextAware contextAware = (CamelContextAware) bean;
+        if (bean instanceof CamelContextAware contextAware && canSetCamelContext(bean, beanName)) {
             DeferredContextBinding deferredBinding = bean.getClass().getAnnotation(DeferredContextBinding.class);
             CamelContext context = getOrLookupCamelContext();
 
@@ -133,7 +132,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         }
 
         if (enabled) {
-            // do bean binding on simple types first, and then afterwards on complex types
+            // do bean binding on simple types first, and then afterward on complex types
             injectCamelContextPass(bean, beanName);
             injectFirstPass(bean, beanName, type -> !isComplexUserType(type));
             injectSecondPass(bean, beanName, type -> isComplexUserType(type));
@@ -151,8 +150,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
             return bean;
         }
 
-        if (bean instanceof DefaultEndpoint) {
-            DefaultEndpoint defaultEndpoint = (DefaultEndpoint) bean;
+        if (bean instanceof DefaultEndpoint defaultEndpoint) {
             defaultEndpoint.setEndpointUriIfNotSpecified(beanName);
         }
 
@@ -196,8 +194,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
     }
 
     protected boolean canSetCamelContext(Object bean, String beanName) {
-        if (bean instanceof CamelContextAware) {
-            CamelContextAware camelContextAware = (CamelContextAware) bean;
+        if (bean instanceof CamelContextAware camelContextAware) {
             CamelContext context = camelContextAware.getCamelContext();
             if (context != null) {
                 LOG.trace("CamelContext already set on bean with id [{}]. Will keep existing CamelContext on bean.", beanName);
@@ -213,7 +210,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         injectFields(bean, beanName, type -> type.isAssignableFrom(CamelContext.class));
     }
 
-    protected void injectFirstPass(Object bean, String beanName, Function<Class, Boolean> filter) {
+    protected void injectFirstPass(Object bean, String beanName, Function<Class<?>, Boolean> filter) {
         // on first pass do field and methods first
         injectFields(bean, beanName, filter);
         injectMethods(bean, beanName, filter);
@@ -226,7 +223,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         }
     }
 
-    protected void injectSecondPass(Object bean, String beanName, Function<Class, Boolean> filter) {
+    protected void injectSecondPass(Object bean, String beanName, Function<Class<?>, Boolean> filter) {
         // on second pass do bind to registry beforehand as they may be used by field/method injections below
         if (bindToRegistrySupported()) {
             injectClass(bean, beanName);
@@ -239,7 +236,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         injectMethods(bean, beanName, filter);
     }
 
-    protected void injectFields(final Object bean, final String beanName, Function<Class, Boolean> accept) {
+    protected void injectFields(final Object bean, final String beanName, Function<Class<?>, Boolean> accept) {
         ReflectionHelper.doWithFields(bean.getClass(), field -> {
             if (accept != null && !accept.apply(field.getType())) {
                 return;
@@ -277,7 +274,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         });
     }
 
-    protected void injectBindToRegistryFields(final Object bean, final String beanName, Function<Class, Boolean> accept) {
+    protected void injectBindToRegistryFields(final Object bean, final String beanName, Function<Class<?>, Boolean> accept) {
         ReflectionHelper.doWithFields(bean.getClass(), field -> {
             if (accept != null && !accept.apply(field.getType())) {
                 return;
@@ -321,7 +318,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
                         field.getName(), bean, beanName));
     }
 
-    protected void injectMethods(final Object bean, final String beanName, Function<Class, Boolean> accept) {
+    protected void injectMethods(final Object bean, final String beanName, Function<Class<?>, Boolean> accept) {
         ReflectionHelper.doWithMethods(bean.getClass(), method -> {
             if (accept != null && !accept.apply(method.getReturnType())) {
                 return;
@@ -337,7 +334,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         });
     }
 
-    protected void injectBindToRegistryMethods(final Object bean, final String beanName, Function<Class, Boolean> accept) {
+    protected void injectBindToRegistryMethods(final Object bean, final String beanName, Function<Class<?>, Boolean> accept) {
         // sort the methods so the simplest are used first
 
         final List<Method> methods = new ArrayList<>();
@@ -352,13 +349,13 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
             }
         });
 
-        // sort methods on shortest number of parameters as we want to process the most simplest first
+        // sort methods on shortest number of parameters as we want to process the simplest first
         methods.sort(Comparator.comparingInt(Method::getParameterCount));
 
-        // then do a more complex sorting where we check inter-dependency among the methods
+        // then do a more complex sorting where we check interdependency among the methods
         methods.sort((m1, m2) -> {
-            Class[] types1 = m1.getParameterTypes();
-            Class[] types2 = m2.getParameterTypes();
+            Class<?>[] types1 = m1.getParameterTypes();
+            Class<?>[] types2 = m2.getParameterTypes();
 
             // favour methods that has no parameters
             if (types1.length == 0 && types2.length == 0) {
@@ -369,14 +366,14 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
                 return 1;
             }
 
-            // okay then compare so we favour methods that does not use parameter types that are returned from other methods
+            // okay then compare, so we favour methods that does not use parameter types that are returned from other methods
             boolean usedByOthers1 = false;
-            for (Class clazz : types1) {
+            for (Class<?> clazz : types1) {
                 usedByOthers1 |= methods.stream()
                         .anyMatch(m -> m.getParameterCount() > 0 && clazz.isAssignableFrom(m.getReturnType()));
             }
             boolean usedByOthers2 = false;
-            for (Class clazz : types2) {
+            for (Class<?> clazz : types2) {
                 usedByOthers2 |= methods.stream()
                         .anyMatch(m -> m.getParameterCount() > 0 && clazz.isAssignableFrom(m.getReturnType()));
             }
@@ -404,7 +401,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         ReflectionHelper.doWithClasses(bean.getClass(), clazz -> {
             BindToRegistry ann = (BindToRegistry) clazz.getAnnotation(BindToRegistry.class);
             if (ann != null) {
-                // its a nested class so we dont have a bean instance for it
+                // it is a nested class so we don't have a bean instance for it
                 bindToRegistry(clazz, ann.value(), null, null, ann.beanPostProcess());
             }
         });
@@ -536,7 +533,7 @@ public class DefaultCamelBeanPostProcessor implements CamelBeanPostProcessor, Ca
         }
     }
 
-    private static boolean isComplexUserType(Class type) {
+    private static boolean isComplexUserType(Class<?> type) {
         // lets consider all non java, as complex types
         return type != null && !type.isPrimitive() && !type.getName().startsWith("java.");
     }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
index c5659eb43aa..216577726d4 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
@@ -643,13 +643,13 @@ public class DefaultRoute extends ServiceSupport implements Route {
                 ((RouteIdAware) consumer).setRouteId(this.getId());
             }
 
-            if (consumer instanceof ResumeAware && resumeStrategy != null) {
-                ResumeAdapter resumeAdapter = AdapterHelper.eval(getCamelContext(), (ResumeAware) consumer, resumeStrategy);
+            if (consumer instanceof ResumeAware<?> && resumeStrategy != null) {
+                ResumeAdapter resumeAdapter = AdapterHelper.eval(getCamelContext(), (ResumeAware<?>) consumer, resumeStrategy);
                 resumeStrategy.setAdapter(resumeAdapter);
                 ((ResumeAware) consumer).setResumeStrategy(resumeStrategy);
             }
 
-            if (consumer instanceof ConsumerListenerAware) {
+            if (consumer instanceof ConsumerListenerAware<?>) {
                 ((ConsumerListenerAware) consumer).setConsumerListener(consumerListener);
             }
         }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DurationRoutePolicy.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DurationRoutePolicy.java
index 942d29e6959..fe5d8e9d2e6 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DurationRoutePolicy.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DurationRoutePolicy.java
@@ -49,7 +49,7 @@ public class DurationRoutePolicy extends org.apache.camel.support.RoutePolicySup
     private CamelContext camelContext;
     private String routeId;
     private ScheduledExecutorService executorService;
-    private volatile ScheduledFuture task;
+    private volatile ScheduledFuture<?> task;
     private final AtomicInteger doneMessages = new AtomicInteger();
     private final AtomicBoolean actionDone = new AtomicBoolean();
 
@@ -162,7 +162,7 @@ public class DurationRoutePolicy extends org.apache.camel.support.RoutePolicySup
         executorService.submit(createTask(true));
     }
 
-    protected ScheduledFuture performMaxDurationAction() {
+    protected ScheduledFuture<?> performMaxDurationAction() {
         return executorService.schedule(createTask(false), maxSeconds, TimeUnit.SECONDS);
     }
 
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java
index dd62aa6b63d..e175fe086a1 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/IntrospectionSupport.java
@@ -69,16 +69,15 @@ final class IntrospectionSupport {
     private static final Logger LOG = LoggerFactory.getLogger(IntrospectionSupport.class);
     private static final List<Method> EXCLUDED_METHODS = new ArrayList<>();
     // use a cache to speedup introspecting for known classes during startup
-    // use a weak cache as we dont want the cache to keep around as it reference classes
+    // use a weak cache as we don't want the cache to keep around as it reference classes
     // which could prevent classloader to unload classes if being referenced from this cache
-    @SuppressWarnings("unchecked")
     private static final Map<Class<?>, BeanIntrospection.ClassInfo> CACHE = LRUCacheFactory.newLRUWeakCache(1000);
     private static final Pattern SECRETS = Pattern.compile(".*(passphrase|password|secretKey).*", Pattern.CASE_INSENSITIVE);
 
     static {
-        // exclude all java.lang.Object methods as we dont want to invoke them
+        // exclude all java.lang.Object methods as we don't want to invoke them
         EXCLUDED_METHODS.addAll(Arrays.asList(Object.class.getMethods()));
-        // exclude all java.lang.reflect.Proxy methods as we dont want to invoke them
+        // exclude all java.lang.reflect.Proxy methods as we don't want to invoke them
         EXCLUDED_METHODS.addAll(Arrays.asList(Proxy.class.getMethods()));
     }
 
@@ -123,8 +122,7 @@ final class IntrospectionSupport {
      * Clears the introspection cache.
      */
     static void clearCache() {
-        if (LOG.isDebugEnabled() && CACHE instanceof LRUCache) {
-            LRUCache localCache = (LRUCache) IntrospectionSupport.CACHE;
+        if (LOG.isDebugEnabled() && CACHE instanceof LRUCache<Class<?>, BeanIntrospection.ClassInfo> localCache) {
             LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", localCache.size(), localCache.getHits(),
                     localCache.getMisses(), localCache.getEvicted());
         }
@@ -196,7 +194,7 @@ final class IntrospectionSupport {
             // a setXXX can also be a builder pattern so check for its return type is itself
             return type.equals(Void.TYPE) || allowBuilderPattern && ObjectHelper.isSubclass(self, type);
         }
-        // or if its a builder method
+        // or if it's a builder method
         if (allowBuilderPattern && parameterCount == 1 && ObjectHelper.isSubclass(self, type)) {
             return true;
         }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/SharedCamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/SharedCamelInternalProcessor.java
index 28f89571d46..d5ce963bca5 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/SharedCamelInternalProcessor.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/SharedCamelInternalProcessor.java
@@ -73,28 +73,26 @@ public class SharedCamelInternalProcessor implements SharedInternalProcessor {
 
     private static final Logger LOG = LoggerFactory.getLogger(SharedCamelInternalProcessor.class);
     private static final Object[] EMPTY_STATES = new Object[0];
-    private final CamelContext camelContext;
     private final ReactiveExecutor reactiveExecutor;
     private final AsyncProcessorAwaitManager awaitManager;
     private final ShutdownStrategy shutdownStrategy;
-    private final List<CamelInternalProcessorAdvice> advices;
+    private final List<CamelInternalProcessorAdvice<?>> advices;
     private byte statefulAdvices;
 
-    public SharedCamelInternalProcessor(CamelContext camelContext, CamelInternalProcessorAdvice... advices) {
-        this.camelContext = camelContext;
+    public SharedCamelInternalProcessor(CamelContext camelContext, CamelInternalProcessorAdvice<?>... advices) {
         this.reactiveExecutor = camelContext.getCamelContextExtension().getReactiveExecutor();
         this.awaitManager = PluginHelper.getAsyncProcessorAwaitManager(camelContext);
         this.shutdownStrategy = camelContext.getShutdownStrategy();
 
         if (advices != null) {
             this.advices = new ArrayList<>(advices.length);
-            for (CamelInternalProcessorAdvice advice : advices) {
+            for (CamelInternalProcessorAdvice<?> advice : advices) {
                 this.advices.add(advice);
                 if (advice.hasState()) {
                     statefulAdvices++;
                 }
             }
-            // ensure advices are sorted so they are in the order we want
+            // ensure advices are sorted, so they are in the order we want
             this.advices.sort(OrderedComparator.get());
         } else {
             this.advices = null;
@@ -155,7 +153,7 @@ public class SharedCamelInternalProcessor implements SharedInternalProcessor {
         final Object[] states = statefulAdvices > 0 ? new Object[statefulAdvices] : EMPTY_STATES;
         // optimise for loop using index access to avoid creating iterator object
         for (int i = 0, j = 0; i < advices.size(); i++) {
-            CamelInternalProcessorAdvice task = advices.get(i);
+            CamelInternalProcessorAdvice<?> task = advices.get(i);
             try {
                 Object state = task.before(exchange);
                 if (task.hasState()) {
@@ -249,10 +247,9 @@ public class SharedCamelInternalProcessor implements SharedInternalProcessor {
         }
 
         @Override
-        @SuppressWarnings("unchecked")
         public void done(boolean doneSync) {
             // NOTE: if you are debugging Camel routes, then all the code in the for loop below is internal only
-            // so you can step straight to the finally block and invoke the callback
+            // so you can step straight to the finally-block and invoke the callback
 
             if (resultProcessor != null) {
                 try {
diff --git a/core/camel-base/src/main/java/org/apache/camel/converter/IOConverter.java b/core/camel-base/src/main/java/org/apache/camel/converter/IOConverter.java
index 307af5e61bf..b3e8e4e6909 100644
--- a/core/camel-base/src/main/java/org/apache/camel/converter/IOConverter.java
+++ b/core/camel-base/src/main/java/org/apache/camel/converter/IOConverter.java
@@ -67,8 +67,8 @@ public final class IOConverter {
     }
 
     @Converter(order = 1)
-    public static InputStream toInputStream(Stream stream, Exchange exchange) {
-        Iterator it = stream.iterator();
+    public static InputStream toInputStream(Stream<?> stream, Exchange exchange) {
+        Iterator<?> it = stream.iterator();
         return new InputStreamIterator(exchange.getContext().getTypeConverter(), it);
     }
 
diff --git a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/URISupport.java b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/URISupport.java
index 66ed1990c37..9718cfc71c1 100644
--- a/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/URISupport.java
+++ b/core/camel-core-catalog/src/main/java/org/apache/camel/catalog/impl/URISupport.java
@@ -409,14 +409,13 @@ public final class URISupport {
             if (options.size() > 0) {
                 StringBuilder rc = new StringBuilder();
                 boolean first = true;
-                for (Object o : options.keySet()) {
+                for (String key : options.keySet()) {
                     if (first) {
                         first = false;
                     } else {
                         rc.append(ampersand);
                     }
 
-                    String key = (String) o;
                     Object value = options.get(key);
 
                     // use the value as a String
@@ -480,8 +479,7 @@ public final class URISupport {
     public static boolean isNotEmpty(Object value) {
         if (value == null) {
             return false;
-        } else if (value instanceof String) {
-            String text = (String) value;
+        } else if (value instanceof String text) {
             return text.trim().length() > 0;
         } else {
             return true;
diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/csimple/CSimpleHelper.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/csimple/CSimpleHelper.java
index a37a7fac7d4..b526f800a43 100644
--- a/core/camel-core-languages/src/main/java/org/apache/camel/language/csimple/CSimpleHelper.java
+++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/csimple/CSimpleHelper.java
@@ -512,7 +512,7 @@ public final class CSimpleHelper {
             // they are equal
             return true;
         } else if (leftValue == null || rightValue == null) {
-            // only one of them is null so they are not equal
+            // only one of them is null, so they are not equal
             return false;
         }
         return org.apache.camel.support.ObjectHelper.typeCoerceContains(exchange.getContext().getTypeConverter(), leftValue,
@@ -577,14 +577,12 @@ public final class CSimpleHelper {
             if (num != null && num >= 0 && size > 0 && size > num - 1) {
                 obj = Array.get(obj, num);
             }
-        } else if (obj instanceof List) {
-            List list = (List) obj;
+        } else if (obj instanceof List<?> list) {
             Integer num = indexAsNumber(context, key, list.size());
             if (num != null && num >= 0 && !list.isEmpty() && list.size() > num - 1) {
                 obj = list.get(num);
             }
-        } else if (obj instanceof Map) {
-            Map map = (Map) obj;
+        } else if (obj instanceof Map<?, ?> map) {
             obj = map.get(key);
         } else {
             // object not a collection type
@@ -598,7 +596,7 @@ public final class CSimpleHelper {
         if (key.startsWith("last")) {
             num = size - 1;
 
-            // maybe its an expression to subtract a number after last
+            // maybe it's an expression to subtract a number after last
             String after = StringHelper.after(key, "-");
             if (after != null) {
                 Integer redux
diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
index 028cb49015a..723c34b3e2d 100644
--- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
+++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
@@ -84,17 +84,15 @@ public class SimpleLanguage extends LanguageSupport implements StaticService {
 
     @Override
     public void stop() {
-        if (cachePredicate instanceof LRUCache) {
+        if (cachePredicate instanceof LRUCache<String, Predicate> cache) {
             if (LOG.isDebugEnabled()) {
-                LRUCache cache = (LRUCache) cachePredicate;
                 LOG.debug("Clearing simple language predicate cache[size={}, hits={}, misses={}, evicted={}]",
                         cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted());
             }
             cachePredicate.clear();
         }
-        if (cacheExpression instanceof LRUCache) {
+        if (cacheExpression instanceof LRUCache<String, Expression> cache) {
             if (LOG.isDebugEnabled()) {
-                LRUCache cache = (LRUCache) cacheExpression;
                 LOG.debug("Clearing simple language expression cache[size={}, hits={}, misses={}, evicted={}]",
                         cache.size(), cache.getHits(), cache.getMisses(), cache.getEvicted());
             }
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json
index ccf9da3d56e..06b5f840e04 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json
@@ -26,7 +26,7 @@
     "errorHandlerRef": { "index": 11, "kind": "attribute", "displayName": "Error Handler", "label": "error", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the bean ref name of the error handler builder to use on this route" },
     "routePolicyRef": { "index": 12, "kind": "attribute", "displayName": "Route Policy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to custom org.apache.camel.spi.RoutePolicy to use by the route. Multiple policies can be configured by separating values using comma." },
     "shutdownRoute": { "index": 13, "kind": "attribute", "displayName": "Shutdown Route", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRoute", "enum": [ "Default", "Defer" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shutdown the route." },
-    "shutdownRunningTask": { "index": 14, "kind": "attribute", "displayName": "Shutdown Running Task", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRunningTask", "enum": [ "CompleteCurrentTaskOnly", "CompleteAllTasks" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shutdown the route." },
+    "shutdownRunningTask": { "index": 14, "kind": "attribute", "displayName": "Shutdown Running Task", "required": false, "type": "enum", "javaType": "org.apache.camel.ShutdownRunningTask", "enum": [ "CompleteCurrentTaskOnly", "CompleteAllTasks" ], "deprecated": false, "autowired": false, "secret": false, "description": "To control how to shut down the route." },
     "input": { "index": 15, "kind": "element", "displayName": "Input", "required": true, "type": "object", "javaType": "org.apache.camel.model.FromDefinition", "oneOf": [ "from" ], "deprecated": false, "autowired": false, "secret": false, "description": "Input to the route." },
     "outputs": { "index": 16, "kind": "element", "displayName": "Outputs", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "mul [...]
     "disabled": { "index": 17, "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
index e13f577c014..3cb51242e3c 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -630,7 +630,7 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition>
      * @param  clazz Class object of the input type
      * @return       the builder
      */
-    public RouteDefinition inputType(Class clazz) {
+    public RouteDefinition inputType(Class<?> clazz) {
         inputType = new InputTypeDefinition().javaClass(clazz).validate(false);
         return this;
     }
@@ -645,7 +645,7 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition>
      * @param  clazz Class object of the input type
      * @return       the builder
      */
-    public RouteDefinition inputTypeWithValidate(Class clazz) {
+    public RouteDefinition inputTypeWithValidate(Class<?> clazz) {
         inputType = new InputTypeDefinition().javaClass(clazz).validate(true);
         return this;
     }
@@ -690,13 +690,13 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition>
      * @param  clazz Class object of the output type
      * @return       the builder
      */
-    public RouteDefinition outputType(Class clazz) {
+    public RouteDefinition outputType(Class<?> clazz) {
         outputType = new OutputTypeDefinition().javaClass(clazz).validate(false);
         return this;
     }
 
     /**
-     * Declare the expected data type of the ouput message by Java class with content validation enabled. If the actual
+     * Declare the expected data type of the output message by Java class with content validation enabled. If the actual
      * message type is different at runtime, camel look for a required {@link org.apache.camel.spi.Transformer} and
      * apply if exists, and then applies {@link org.apache.camel.spi.Validator} as well.
      *
@@ -705,7 +705,7 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition>
      * @param  clazz Class object of the output type
      * @return       the builder
      */
-    public RouteDefinition outputTypeWithValidate(Class clazz) {
+    public RouteDefinition outputTypeWithValidate(Class<?> clazz) {
         outputType = new OutputTypeDefinition().javaClass(clazz).validate(true);
         return this;
     }
@@ -1086,14 +1086,14 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition>
     }
 
     /**
-     * To control how to shutdown the route.
+     * To control how to shut down the route.
      */
     public String getShutdownRunningTask() {
         return shutdownRunningTask;
     }
 
     /**
-     * To control how to shutdown the route.
+     * To control how to shut down the route.
      */
     @XmlAttribute
     @Metadata(label = "advanced", javaType = "org.apache.camel.ShutdownRunningTask", defaultValue = "CompleteCurrentTaskOnly",
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
index 1609e36bd9a..0addb6dc7f4 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
@@ -42,7 +42,7 @@ import org.apache.camel.spi.Metadata;
 @XmlRootElement(name = "routeTemplate")
 @XmlType(propOrder = { "templateParameters", "templateBeans", "route" })
 @XmlAccessorType(XmlAccessType.FIELD)
-public class RouteTemplateDefinition extends OptionalIdentifiedDefinition {
+public class RouteTemplateDefinition extends OptionalIdentifiedDefinition<RouteTemplateDefinition> {
 
     @XmlTransient
     private Consumer<RouteTemplateContext> configurer;
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/ContractAdvice.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/ContractAdvice.java
index 22cdc199be5..1de209d8cdb 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/ContractAdvice.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/ContractAdvice.java
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
  * @see org.apache.camel.model.InputTypeDefinition
  * @see org.apache.camel.model.OutputTypeDefinition
  */
-public class ContractAdvice implements CamelInternalProcessorAdvice {
+public class ContractAdvice implements CamelInternalProcessorAdvice<Object> {
     private static final Logger LOG = LoggerFactory.getLogger(ContractAdvice.class);
 
     private final Contract contract;
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/RecipientListProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/RecipientListProcessor.java
index 109e78fcf72..4bf1ba68211 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/RecipientListProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/RecipientListProcessor.java
@@ -201,7 +201,7 @@ public class RecipientListProcessor extends MulticastProcessor {
         // optimize for recipient without need for using delimiter
         // (if its list/collection/array type)
         if (recipientList instanceof List) {
-            List col = (List) recipientList;
+            List<?> col = (List<?>) recipientList;
             int size = col.size();
             List<ProcessorExchangePair> result = new ArrayList<>(size);
             int index = 0;
@@ -211,7 +211,7 @@ public class RecipientListProcessor extends MulticastProcessor {
             }
             return result;
         } else if (recipientList instanceof Collection) {
-            Collection col = (Collection) recipientList;
+            Collection<?> col = (Collection<?>) recipientList;
             int size = col.size();
             List<ProcessorExchangePair> result = new ArrayList<>(size);
             int index = 0;
@@ -353,8 +353,7 @@ public class RecipientListProcessor extends MulticastProcessor {
             return (Endpoint) recipient;
         }
         if (recipient != null) {
-            if (recipient instanceof NormalizedEndpointUri) {
-                NormalizedEndpointUri nu = (NormalizedEndpointUri) recipient;
+            if (recipient instanceof NormalizedEndpointUri nu) {
                 CamelContext ecc = exchange.getContext();
                 return ecc.getCamelContextExtension().hasEndpoint(nu);
             } else {
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/TransientResumeStrategy.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/TransientResumeStrategy.java
index ca35a1757b3..87cb7ed8050 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/TransientResumeStrategy.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/TransientResumeStrategy.java
@@ -101,15 +101,15 @@ public class TransientResumeStrategy implements ResumeStrategy {
         // this is NO-OP
     }
 
-    public static ResumeStrategyConfigurationBuilder<ResumeStrategyConfigurationBuilder, ResumeStrategyConfiguration> configurationBuilder() {
+    public static ResumeStrategyConfigurationBuilder<ResumeStrategyConfigurationBuilder<?, ?>, ResumeStrategyConfiguration> configurationBuilder() {
         return new ResumeStrategyConfigurationBuilder<>() {
             @Override
-            public ResumeStrategyConfigurationBuilder withCacheFillPolicy(Cacheable.FillPolicy cacheFillPolicy) {
+            public ResumeStrategyConfigurationBuilder<?, ?> withCacheFillPolicy(Cacheable.FillPolicy cacheFillPolicy) {
                 return this;
             }
 
             @Override
-            public ResumeStrategyConfigurationBuilder withResumeCache(ResumeCache<?> resumeCache) {
+            public ResumeStrategyConfigurationBuilder<?, ?> withResumeCache(ResumeCache<?> resumeCache) {
                 return this;
             }
 
@@ -179,7 +179,7 @@ public class TransientResumeStrategy implements ResumeStrategy {
 
             @Override
             public void forEach(BiFunction<? super Object, ? super Object, Boolean> action) {
-                for (Map.Entry e : cache.entrySet()) {
+                for (Map.Entry<Object, Object> e : cache.entrySet()) {
                     if (!action.apply(e.getKey(), e.getValue())) {
                         cache.remove(e.getKey());
                     }
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/DisabledReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/DisabledReifier.java
index 999bdbaeeb6..9a21bef3f83 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/DisabledReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/DisabledReifier.java
@@ -21,9 +21,9 @@ import org.apache.camel.Route;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.processor.DisabledProcessor;
 
-public class DisabledReifier extends ProcessorReifier {
+public class DisabledReifier<T extends ProcessorDefinition<?>> extends ProcessorReifier<T> {
 
-    public DisabledReifier(Route route, ProcessorDefinition<?> definition) {
+    public DisabledReifier(Route route, T definition) {
         super(route, definition);
     }
 
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index cac0f2cce9b..1646b8d7a9e 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -164,7 +164,7 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
         if (route != null && route.getCamelContext() != null) {
             Boolean disabled = CamelContextHelper.parseBoolean(route.getCamelContext(), definition.getDisabled());
             if (disabled != null && disabled) {
-                return new DisabledReifier(route, definition);
+                return new DisabledReifier<>(route, definition);
             }
         }
 
@@ -353,9 +353,9 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
     }
 
     /**
-     * Will lookup and get the configured {@link ExecutorService} from the given definition.
+     * Will look up and get the configured {@link ExecutorService} from the given definition.
      * <p/>
-     * This method will lookup for configured thread pool in the following order
+     * This method will look up for configured thread pool in the following order
      * <ul>
      * <li>from the definition if any explicit configured executor service.</li>
      * <li>from the {@link org.apache.camel.spi.Registry} if found</li>
@@ -400,10 +400,10 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
     }
 
     /**
-     * Will lookup and get the configured {@link java.util.concurrent.ScheduledExecutorService} from the given
+     * Will look up and get the configured {@link java.util.concurrent.ScheduledExecutorService} from the given
      * definition.
      * <p/>
-     * This method will lookup for configured thread pool in the following order
+     * This method will look up for configured thread pool in the following order
      * <ul>
      * <li>from the definition if any explicit configured executor service.</li>
      * <li>from the {@link org.apache.camel.spi.Registry} if found</li>
@@ -697,12 +697,11 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
             } else {
                 LOG.trace("{} is part of CircuitBreaker so no error handler is applied", definition);
             }
-        } else if (definition instanceof MulticastDefinition) {
-            // do not use error handler for multicast as it offers fine grained
+        } else if (definition instanceof MulticastDefinition def) {
+            // do not use error handler for multicast as it offers fine-grained
             // error handlers for its outputs
             // however if share unit of work is enabled, we need to wrap an
             // error handler on the multicast parent
-            MulticastDefinition def = (MulticastDefinition) definition;
             boolean isShareUnitOfWork = parseBoolean(def.getShareUnitOfWork(), false);
             if (isShareUnitOfWork && child == null) {
                 // only wrap the parent (not the children of the multicast)
@@ -906,7 +905,7 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
      * @throws IllegalArgumentException is thrown if lookup of aggregation strategy in
      *                                  {@link org.apache.camel.spi.Registry} was not found
      */
-    public AggregationStrategy getConfiguredAggregationStrategy(AggregationStrategyAwareDefinition definition) {
+    public AggregationStrategy getConfiguredAggregationStrategy(AggregationStrategyAwareDefinition<?> definition) {
         AggregationStrategy strategy = definition.getAggregationStrategyBean();
         if (strategy == null && definition.getAggregationStrategyRef() != null) {
             Object aggStrategy = lookupByName(definition.getAggregationStrategyRef());
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/AddRoutesAtRuntimeTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/AddRoutesAtRuntimeTest.java
index 5ade2f876cd..a19dace95de 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/AddRoutesAtRuntimeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/AddRoutesAtRuntimeTest.java
@@ -48,7 +48,7 @@ public class AddRoutesAtRuntimeTest extends ContextTestSupport {
         // use reflection to test that we do not leak bootstraps when dynamic adding routes
         Method m = AbstractCamelContext.class.getDeclaredMethod("getBootstraps");
         m.setAccessible(true);
-        Assertions.assertEquals(0, ((List) m.invoke(context)).size());
+        Assertions.assertEquals(0, ((List<?>) m.invoke(context)).size());
 
         getMockEndpoint("mock:bar").expectedMessageCount(1);
         context.addRoutes(new MyDynamcRouteBuilder(context, "direct:bar", "mock:bar"));
@@ -57,7 +57,7 @@ public class AddRoutesAtRuntimeTest extends ContextTestSupport {
         assertEquals(3, context.getRoutes().size());
 
         // use reflection to test that we do not leak bootstraps when dynamic adding routes
-        Assertions.assertEquals(0, ((List) m.invoke(context)).size());
+        Assertions.assertEquals(0, ((List<?>) m.invoke(context)).size());
     }
 
     @Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/ExpressionBuilderConcurrencyTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/ExpressionBuilderConcurrencyTest.java
index 273d18245fe..ecddeb788f9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/ExpressionBuilderConcurrencyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/ExpressionBuilderConcurrencyTest.java
@@ -46,8 +46,8 @@ public class ExpressionBuilderConcurrencyTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
 
         return new RouteBuilder() {
-            Map body = Map.of("label", "ALabel", "startLabel", "Document", "endLabel", "Document");
-            String simpleTemplate
+            final Map<String, String> body = Map.of("label", "ALabel", "startLabel", "Document", "endLabel", "Document");
+            final String simpleTemplate
                     = "This is a test a with startLabel: `${body.get('startLabel')}` endLabel: `${body.get('endLabel')}` and label: `${body.get('label')}`";
 
             @Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
index 761a590c0ee..2970eec67d8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
@@ -57,16 +57,13 @@ public class BeanReturnCallableReturnNullTest extends ContextTestSupport {
 
     public static class MyBean {
 
-        public Callable doSomething(final Exchange exchange) {
-            return new Callable() {
-                @Override
-                public Object call() throws Exception {
-                    String body = exchange.getIn().getBody(String.class);
-                    exchange.getIn().setHeader("user", "admin");
-                    exchange.getIn().setBody(body + "MyBean");
-                    // return null as we have set changes already
-                    return null;
-                }
+        public Callable<Object> doSomething(final Exchange exchange) {
+            return () -> {
+                String body = exchange.getIn().getBody(String.class);
+                exchange.getIn().setHeader("user", "admin");
+                exchange.getIn().setBody(body + "MyBean");
+                // return null as we have set changes already
+                return null;
             };
         }
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
index dc1f69d710d..5239f4901b0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
@@ -55,13 +55,8 @@ public class BeanReturnCallableTest extends ContextTestSupport {
 
     public static class MyBean {
 
-        public Callable doSomething() {
-            return new Callable() {
-                @Override
-                public Object call() throws Exception {
-                    return "I was called";
-                }
-            };
+        public Callable<String> doSomething() {
+            return () -> "I was called";
         }
     }
 
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
index 5a71e2857f2..34382456304 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
@@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class BeanWithHeadersAndBodyInject3Test extends ContextTestSupport {
-    private MyBean myBean = new MyBean();
+    private final MyBean myBean = new MyBean();
 
     @Override
     protected RouteBuilder createRouteBuilder() {
@@ -79,7 +79,7 @@ public class BeanWithHeadersAndBodyInject3Test extends ContextTestSupport {
 
     public static class MyBean {
 
-        public String doSomething(@Body String body, @Headers Map headers) {
+        public String doSomething(@Body String body, @Headers Map<String, Object> headers) {
             headers.put("out", 123);
             return "Hello!";
         }
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanInfoSingleMethodServiceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanInfoSingleMethodServiceTest.java
index c2af8cef6a8..9a0372ed907 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanInfoSingleMethodServiceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanInfoSingleMethodServiceTest.java
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class BeanInfoSingleMethodServiceTest extends ContextTestSupport {
 
-    private SingleMethodService myService = new SingleMethodServiceImpl();
+    private final SingleMethodService<String, String> myService = new SingleMethodServiceImpl();
 
     @Test
     public void testBeanInfoSingleMethodRoute() throws Exception {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
index b6d6cad9497..895727fac5e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
@@ -67,7 +67,7 @@ public class FileProducerMoveExistingStrategyTest extends ContextTestSupport {
         private int counter;
 
         @Override
-        public boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperations operations, String fileName)
+        public boolean moveExistingFile(GenericFileEndpoint<?> endpoint, GenericFileOperations<?> operations, String fileName)
                 throws GenericFileOperationFailedException {
 
             // need to evaluate using a dummy and simulate the file first, to
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyGroupedBodyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyGroupedBodyTest.java
index 3469bd1b56e..5e623b03ed1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyGroupedBodyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyGroupedBodyTest.java
@@ -38,7 +38,7 @@ public class AggregationStrategyGroupedBodyTest extends ContextTestSupport {
 
         assertMockEndpointsSatisfied();
 
-        List list = (List) getMockEndpoint("mock:result").getExchanges().get(0).getMessage().getBody();
+        List<?> list = (List<?>) getMockEndpoint("mock:result").getExchanges().get(0).getMessage().getBody();
         assertNotNull(list);
         assertEquals(3, list.size());
         assertEquals("A", list.get(0));
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 238bb7ef8cc..300d10a29a4 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -276,9 +276,8 @@ public abstract class BaseMainSupport extends BaseService {
             for (Class<?> clazz : found) {
                 // lets use Camel's injector so the class has some support for dependency injection
                 Object config = camelContext.getInjector().newInstance(clazz);
-                if (config instanceof CamelConfiguration) {
-                    LOG.debug("Discovered CamelConfiguration class: {}", clazz);
-                    CamelConfiguration cc = (CamelConfiguration) config;
+                if (config instanceof CamelConfiguration cc) {
+                    LOG.debug("Discovered CamelConfiguration class: {}", cc);
                     mainConfigurationProperties.addConfiguration(cc);
                 }
             }
@@ -298,7 +297,7 @@ public abstract class BaseMainSupport extends BaseService {
                     // ignore
                 }
                 if (!mainClass) {
-                    // lets use Camel's injector so the class has some support for dependency injection
+                    // let's use Camel's injector so the class has some support for dependency injection
                     CamelConfiguration config = camelContext.getInjector().newInstance(configClazz);
                     mainConfigurationProperties.addConfiguration(config);
                 }
@@ -407,11 +406,10 @@ public abstract class BaseMainSupport extends BaseService {
         }
     }
 
-    private void scheduleRefresh(CamelContext camelContext, String key, long vc) throws Exception {
+    private void scheduleRefresh(CamelContext camelContext, String key, long period) throws Exception {
         final Optional<Runnable> task = PluginHelper.getPeriodTaskResolver(camelContext)
                 .newInstance(key, Runnable.class);
         if (task.isPresent()) {
-            long period = vc;
             Runnable r = task.get();
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Scheduling: {} (period: {})", r, TimeUtils.printDuration(period, false));
@@ -1316,7 +1314,7 @@ public abstract class BaseMainSupport extends BaseService {
             throws Exception {
 
         // make defensive copy as we mutate the map
-        Set<String> keys = new LinkedHashSet(properties.keySet());
+        Set<String> keys = new LinkedHashSet<>(properties.asMap().keySet());
         // set properties per console
         for (String key : keys) {
             String name = StringHelper.before(key, ".");
@@ -1368,7 +1366,7 @@ public abstract class BaseMainSupport extends BaseService {
         VaultConfiguration target = camelContext.getVaultConfiguration();
 
         // make defensive copy as we mutate the map
-        Set<String> keys = new LinkedHashSet(properties.keySet());
+        Set<String> keys = new LinkedHashSet<>(properties.asMap().keySet());
         // set properties per different vault component
         for (String key : keys) {
             String name = StringHelper.before(key, ".");
@@ -1398,7 +1396,7 @@ public abstract class BaseMainSupport extends BaseService {
             throws Exception {
 
         // make defensive copy as we mutate the map
-        Set<String> keys = new LinkedHashSet(properties.keySet());
+        Set<String> keys = new LinkedHashSet<>(properties.asMap().keySet());
         // find names of beans (dot style)
         final Set<String> beansDot
                 = properties.keySet().stream()
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/InstrumentationInterceptStrategy.java b/core/camel-management/src/main/java/org/apache/camel/management/InstrumentationInterceptStrategy.java
index 05d16880763..bae6d03b013 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/InstrumentationInterceptStrategy.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/InstrumentationInterceptStrategy.java
@@ -33,11 +33,11 @@ import org.apache.camel.util.KeyValueHolder;
  */
 public class InstrumentationInterceptStrategy implements ManagementInterceptStrategy {
 
-    private Map<NamedNode, PerformanceCounter> registeredCounters;
-    private final Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor>> wrappedProcessors;
+    private final Map<NamedNode, PerformanceCounter> registeredCounters;
+    private final Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor<?>>> wrappedProcessors;
 
     public InstrumentationInterceptStrategy(Map<NamedNode, PerformanceCounter> registeredCounters,
-                                            Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor>> wrappedProcessors) {
+                                            Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor<?>>> wrappedProcessors) {
         this.registeredCounters = registeredCounters;
         this.wrappedProcessors = wrappedProcessors;
     }
@@ -49,13 +49,13 @@ public class InstrumentationInterceptStrategy implements ManagementInterceptStra
 
     @Override
     public InstrumentationProcessor<?> createProcessor(NamedNode definition, Processor target) {
-        InstrumentationProcessor instrumentationProcessor
+        InstrumentationProcessor<?> instrumentationProcessor
                 = new DefaultInstrumentationProcessor(definition.getShortName(), target);
         PerformanceCounter counter = registeredCounters.get(definition);
         if (counter != null) {
             // add it to the mapping of wrappers so we can later change it to a
             // decorated counter when we register the processor
-            KeyValueHolder<NamedNode, InstrumentationProcessor> holder
+            KeyValueHolder<NamedNode, InstrumentationProcessor<?>> holder
                     = new KeyValueHolder<>(definition, instrumentationProcessor);
             wrappedProcessors.put(target, holder);
         }
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java b/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java
index 9fde1bfe502..6db96c7a03f 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java
@@ -125,7 +125,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
 
     // the wrapped processors is for performance counters, which are in use for the created routes
     // when a route is removed, we should remove the associated processors from this map
-    private final Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor>> wrappedProcessors = new HashMap<>();
+    private final Map<Processor, KeyValueHolder<NamedNode, InstrumentationProcessor<?>>> wrappedProcessors = new HashMap<>();
     private final List<java.util.function.Consumer<JmxManagementLifecycleStrategy>> preServices = new ArrayList<>();
     private final TimerListenerManager loadTimer = new ManagedLoadTimer();
     private final TimerListenerManagerStartupListener loadTimerStartupListener = new TimerListenerManagerStartupListener();
@@ -189,7 +189,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
                     // okay there exists already a CamelContext with this name, we can try to fix it by finding a free name
                     boolean fixed = false;
                     // if we use the default name strategy we can find a free name to use
-                    String newName = findFreeName(mc, context.getManagementNameStrategy(), name);
+                    String newName = findFreeName(context.getManagementNameStrategy(), name);
                     if (newName != null) {
                         // use this as the fixed name
                         fixed = true;
@@ -267,7 +267,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         }
     }
 
-    private String findFreeName(Object mc, ManagementNameStrategy strategy, String name) throws MalformedObjectNameException {
+    private String findFreeName(ManagementNameStrategy strategy, String name) throws MalformedObjectNameException {
         // we cannot find a free name for fixed named strategies
         if (strategy.isFixedName()) {
             return null;
@@ -290,13 +290,13 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
     }
 
     /**
-     * After {@link CamelContext} has been enlisted in JMX using {@link #onContextStart(org.apache.camel.CamelContext)}
-     * then we can enlist any pre registered services as well, as we had to wait for {@link CamelContext} to be enlisted
-     * first.
+     * After {@link CamelContext} has been enlisted in JMX using
+     * {@link #onContextStarted(org.apache.camel.CamelContext)} then we can enlist any pre-registered services as well,
+     * as we had to wait for {@link CamelContext} to be enlisted first.
      * <p/>
-     * A component/endpoint/service etc. can be pre registered when using dependency injection and annotations such as
-     * {@link org.apache.camel.Produce}, {@link org.apache.camel.EndpointInject}. Therefore we need to capture those
-     * registrations up front, and then afterwards enlist in JMX when {@link CamelContext} is being started.
+     * A component/endpoint/service etc. can be pre-registered when using dependency injection and annotations such as
+     * {@link org.apache.camel.Produce}, {@link org.apache.camel.EndpointInject}. Therefore, we need to capture those
+     * registrations up front, and then afterward enlist in JMX when {@link CamelContext} is being started.
      */
     private void enlistPreRegisteredServices() {
         if (preServices.isEmpty()) {
@@ -483,7 +483,6 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         }
     }
 
-    @SuppressWarnings("unchecked")
     private Object getManagedObjectForService(CamelContext context, Service service, Route route) {
         // skip channel, UoW and dont double wrap instrumentation
         if (service instanceof Channel || service instanceof UnitOfWork || service instanceof InstrumentationProcessor) {
@@ -497,9 +496,8 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
 
         Object answer = null;
 
-        if (service instanceof BacklogTracer) {
+        if (service instanceof BacklogTracer backlogTracer) {
             // special for backlog tracer
-            BacklogTracer backlogTracer = (BacklogTracer) service;
             ManagedBacklogTracer mt = managedBacklogTracers.get(backlogTracer);
             if (mt == null) {
                 mt = new ManagedBacklogTracer(context, backlogTracer);
@@ -507,9 +505,8 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
                 managedBacklogTracers.put(backlogTracer, mt);
             }
             return mt;
-        } else if (service instanceof BacklogDebugger) {
+        } else if (service instanceof BacklogDebugger backlogDebugger) {
             // special for backlog debugger
-            BacklogDebugger backlogDebugger = (BacklogDebugger) service;
             ManagedBacklogDebugger md = managedBacklogDebuggers.get(backlogDebugger);
             if (md == null) {
                 md = new ManagedBacklogDebugger(context, backlogDebugger);
@@ -540,8 +537,8 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
             answer = new ManagedProducerCache(context, (ProducerCache) service);
         } else if (service instanceof ExchangeFactoryManager) {
             answer = new ManagedExchangeFactoryManager(context, (ExchangeFactoryManager) service);
-        } else if (service instanceof EndpointRegistry) {
-            answer = new ManagedEndpointRegistry(context, (EndpointRegistry) service);
+        } else if (service instanceof EndpointRegistry<?> endpointRegistry) {
+            answer = new ManagedEndpointRegistry(context, endpointRegistry);
         } else if (service instanceof BeanIntrospection) {
             answer = new ManagedBeanIntrospection(context, (BeanIntrospection) service);
         } else if (service instanceof TypeConverterRegistry) {
@@ -558,10 +555,10 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
             answer = new ManagedStreamCachingStrategy(context, (StreamCachingStrategy) service);
         } else if (service instanceof EventNotifier) {
             answer = getManagementObjectStrategy().getManagedObjectForEventNotifier(context, (EventNotifier) service);
-        } else if (service instanceof TransformerRegistry) {
-            answer = new ManagedTransformerRegistry(context, (TransformerRegistry) service);
-        } else if (service instanceof ValidatorRegistry) {
-            answer = new ManagedValidatorRegistry(context, (ValidatorRegistry) service);
+        } else if (service instanceof TransformerRegistry<?> transformerRegistry) {
+            answer = new ManagedTransformerRegistry(context, transformerRegistry);
+        } else if (service instanceof ValidatorRegistry<?> validatorRegistry) {
+            answer = new ManagedValidatorRegistry(context, validatorRegistry);
         } else if (service instanceof CamelClusterService) {
             answer = getManagementObjectStrategy().getManagedObjectForClusterService(context, (CamelClusterService) service);
         } else if (service != null) {
@@ -569,8 +566,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
             answer = getManagementObjectStrategy().getManagedObjectForService(context, service);
         }
 
-        if (answer instanceof ManagedService) {
-            ManagedService ms = (ManagedService) answer;
+        if (answer instanceof ManagedService ms) {
             ms.setRoute(route);
             ms.init(getManagementStrategy());
         }
@@ -582,9 +578,9 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         // a bit of magic here as the processors we want to manage have already been registered
         // in the wrapped processors map when Camel have instrumented the route on route initialization
         // so the idea is now to only manage the processors from the map
-        KeyValueHolder<NamedNode, InstrumentationProcessor> holder = wrappedProcessors.get(processor);
+        KeyValueHolder<NamedNode, InstrumentationProcessor<?>> holder = wrappedProcessors.get(processor);
         if (holder == null) {
-            // skip as its not an well known processor we want to manage anyway, such as Channel/UnitOfWork/Pipeline etc.
+            // skip as it's not a well known processor we want to manage anyway, such as Channel/UnitOfWork/Pipeline etc.
             return null;
         }
 
@@ -595,7 +591,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         if (managedObject != null) {
             // is it a performance counter then we need to set our counter
             if (managedObject instanceof PerformanceCounter) {
-                InstrumentationProcessor counter = holder.getValue();
+                InstrumentationProcessor<?> counter = holder.getValue();
                 if (counter != null) {
                     // change counter to us
                     counter.setCounter(managedObject);
@@ -635,13 +631,10 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
             // get the wrapped instrumentation processor from this route
             // and set me as the counter
             Processor processor = route.getProcessor();
-            if (processor instanceof InternalProcessor && mr instanceof ManagedRoute) {
-                InternalProcessor internal = (InternalProcessor) processor;
-                ManagedRoute routeMBean = (ManagedRoute) mr;
-
+            if (processor instanceof InternalProcessor internal && mr instanceof ManagedRoute routeMBean) {
                 DefaultInstrumentationProcessor task = internal.getAdvice(DefaultInstrumentationProcessor.class);
                 if (task != null) {
-                    // we need to wrap the counter with the camel context so we get stats updated on the context as well
+                    // we need to wrap the counter with the camel context, so we get stats updated on the context as well
                     if (camelContextMBean != null) {
                         CompositePerformanceCounter wrapper = new CompositePerformanceCounter(routeMBean, camelContextMBean);
                         task.setCounter(wrapper);
@@ -767,7 +760,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         }
 
         // set this managed intercept strategy that executes the JMX instrumentation for performance metrics
-        // so our registered counters can be used for fine grained performance instrumentation
+        // so our registered counters can be used for fine-grained performance instrumentation
         route.setManagementInterceptStrategy(new InstrumentationInterceptStrategy(registeredCounters, wrappedProcessors));
     }
 
@@ -783,9 +776,9 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         for (Route route : routes) {
             String id = route.getId();
 
-            Iterator<KeyValueHolder<NamedNode, InstrumentationProcessor>> it = wrappedProcessors.values().iterator();
+            Iterator<KeyValueHolder<NamedNode, InstrumentationProcessor<?>>> it = wrappedProcessors.values().iterator();
             while (it.hasNext()) {
-                KeyValueHolder<NamedNode, InstrumentationProcessor> holder = it.next();
+                KeyValueHolder<NamedNode, InstrumentationProcessor<?>> holder = it.next();
                 RouteDefinition def = ProcessorDefinitionHelper.getRoute(holder.getKey());
                 if (def != null && id.equals(def.getId())) {
                     it.remove();
@@ -879,8 +872,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
      */
     protected void manageObject(Object me) throws Exception {
         getManagementStrategy().manageObject(me);
-        if (me instanceof TimerListener) {
-            TimerListener timer = (TimerListener) me;
+        if (me instanceof TimerListener timer) {
             loadTimer.addTimerListener(timer);
         }
     }
@@ -900,7 +892,7 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
     }
 
     /**
-     * Whether or not to register the mbean.
+     * Whether to register the mbean.
      * <p/>
      * The {@link ManagementAgent} has options which controls when to register. This allows us to only register mbeans
      * accordingly. For example by default any dynamic endpoints is not registered. This avoids to register excessive
@@ -999,71 +991,4 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li
         managedThreadPools.clear();
     }
 
-    /**
-     * Class which holds any pre registration details.
-     *
-     * @see JmxManagementLifecycleStrategy#enlistPreRegisteredServices()
-     */
-    static final class PreRegisterService {
-
-        private String name;
-        private Component component;
-        private Endpoint endpoint;
-        private CamelContext camelContext;
-        private Service service;
-        private Route route;
-        private java.util.function.Consumer<JmxManagementLifecycleStrategy> runnable;
-
-        public PreRegisterService() {
-        }
-
-        public PreRegisterService(java.util.function.Consumer<JmxManagementLifecycleStrategy> runnable) {
-            this.runnable = runnable;
-        }
-
-        public void onComponentAdd(String name, Component component) {
-            this.name = name;
-            this.component = component;
-        }
-
-        public void onEndpointAdd(Endpoint endpoint) {
-            this.endpoint = endpoint;
-        }
-
-        public void onServiceAdd(CamelContext camelContext, Service service, Route route) {
-            this.camelContext = camelContext;
-            this.service = service;
-            this.route = route;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public Component getComponent() {
-            return component;
-        }
-
-        public Endpoint getEndpoint() {
-            return endpoint;
-        }
-
-        public CamelContext getCamelContext() {
-            return camelContext;
-        }
-
-        public Service getService() {
-            return service;
-        }
-
-        public Route getRoute() {
-            return route;
-        }
-
-        public java.util.function.Consumer<JmxManagementLifecycleStrategy> getRunnable() {
-            return runnable;
-        }
-
-    }
-
 }
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/ManagedCamelContextImpl.java b/core/camel-management/src/main/java/org/apache/camel/management/ManagedCamelContextImpl.java
index b3b1ddd0115..99df07c2198 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/ManagedCamelContextImpl.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/ManagedCamelContextImpl.java
@@ -55,7 +55,7 @@ public class ManagedCamelContextImpl implements ManagedCamelContext {
         }
 
         Processor processor = camelContext.getProcessor(id);
-        ProcessorDefinition def
+        ProcessorDefinition<?> def
                 = camelContext.getCamelContextExtension().getContextPlugin(Model.class).getProcessorDefinition(id);
 
         // processor may be null if its anonymous inner class or as lambda
@@ -80,7 +80,7 @@ public class ManagedCamelContextImpl implements ManagedCamelContext {
         }
 
         Processor processor = camelContext.getProcessor(id);
-        ProcessorDefinition def
+        ProcessorDefinition<?> def
                 = camelContext.getCamelContextExtension().getContextPlugin(Model.class).getProcessorDefinition(id);
 
         // processor may be null if its anonymous inner class or as lambda
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDynamicRouter.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDynamicRouter.java
index 2ef51641702..b608ab3806b 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDynamicRouter.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDynamicRouter.java
@@ -41,14 +41,14 @@ public class ManagedDynamicRouter extends ManagedProcessor implements ManagedDyn
     private String uri;
     private boolean sanitize;
 
-    public ManagedDynamicRouter(CamelContext context, DynamicRouter processor, DynamicRouterDefinition definition) {
+    public ManagedDynamicRouter(CamelContext context, DynamicRouter processor, DynamicRouterDefinition<?> definition) {
         super(context, processor, definition);
         this.processor = processor;
     }
 
     @Override
-    public DynamicRouterDefinition getDefinition() {
-        return (DynamicRouterDefinition) super.getDefinition();
+    public DynamicRouterDefinition<?> getDefinition() {
+        return (DynamicRouterDefinition<?>) super.getDefinition();
     }
 
     @Override
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
index c10f8cb59c3..7b1d093c51c 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
@@ -36,10 +36,10 @@ import org.apache.camel.util.URISupport;
 
 @ManagedResource(description = "Managed EndpointRegistry")
 public class ManagedEndpointRegistry extends ManagedService implements ManagedEndpointRegistryMBean {
-    private final EndpointRegistry endpointRegistry;
+    private final EndpointRegistry<?> endpointRegistry;
     private boolean sanitize;
 
-    public ManagedEndpointRegistry(CamelContext context, EndpointRegistry endpointRegistry) {
+    public ManagedEndpointRegistry(CamelContext context, EndpointRegistry<?> endpointRegistry) {
         super(context, endpointRegistry);
         this.endpointRegistry = endpointRegistry;
     }
@@ -50,7 +50,7 @@ public class ManagedEndpointRegistry extends ManagedService implements ManagedEn
         sanitize = strategy.getManagementAgent().getMask() != null ? strategy.getManagementAgent().getMask() : false;
     }
 
-    public EndpointRegistry getEndpointRegistry() {
+    public EndpointRegistry<?> getEndpointRegistry() {
         return endpointRegistry;
     }
 
@@ -85,7 +85,6 @@ public class ManagedEndpointRegistry extends ManagedService implements ManagedEn
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public TabularData listEndpoints() {
         try {
             TabularData answer = new TabularDataSupport(CamelOpenMBeanTypes.listEndpointsTabularType());
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRecipientList.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRecipientList.java
index a05569b8af9..cba5a49c6b6 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRecipientList.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRecipientList.java
@@ -41,7 +41,7 @@ public class ManagedRecipientList extends ManagedProcessor implements ManagedRec
     private String uri;
     private boolean sanitize;
 
-    public ManagedRecipientList(CamelContext context, RecipientList processor, RecipientListDefinition definition) {
+    public ManagedRecipientList(CamelContext context, RecipientList processor, RecipientListDefinition<?> definition) {
         super(context, processor, definition);
         this.processor = processor;
     }
@@ -70,8 +70,8 @@ public class ManagedRecipientList extends ManagedProcessor implements ManagedRec
     }
 
     @Override
-    public RecipientListDefinition getDefinition() {
-        return (RecipientListDefinition) super.getDefinition();
+    public RecipientListDefinition<?> getDefinition() {
+        return (RecipientListDefinition<?>) super.getDefinition();
     }
 
     @Override
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRoutingSlip.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRoutingSlip.java
index d920d46e1ab..9dbc2d84fe1 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRoutingSlip.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRoutingSlip.java
@@ -41,7 +41,7 @@ public class ManagedRoutingSlip extends ManagedProcessor implements ManagedRouti
     private String uri;
     private boolean sanitize;
 
-    public ManagedRoutingSlip(CamelContext context, RoutingSlip processor, RoutingSlipDefinition definition) {
+    public ManagedRoutingSlip(CamelContext context, RoutingSlip processor, RoutingSlipDefinition<?> definition) {
         super(context, processor, definition);
         this.processor = processor;
     }
@@ -70,8 +70,8 @@ public class ManagedRoutingSlip extends ManagedProcessor implements ManagedRouti
     }
 
     @Override
-    public RoutingSlipDefinition getDefinition() {
-        return (RoutingSlipDefinition) super.getDefinition();
+    public RoutingSlipDefinition<?> getDefinition() {
+        return (RoutingSlipDefinition<?>) super.getDefinition();
     }
 
     @Override
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRuntimeEndpointRegistry.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRuntimeEndpointRegistry.java
index b34600ea741..7b4aef19ed0 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRuntimeEndpointRegistry.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRuntimeEndpointRegistry.java
@@ -96,7 +96,7 @@ public class ManagedRuntimeEndpointRegistry extends ManagedService implements Ma
         try {
             TabularData answer = new TabularDataSupport(CamelOpenMBeanTypes.listRuntimeEndpointsTabularType());
 
-            EndpointRegistry staticRegistry = getContext().getEndpointRegistry();
+            EndpointRegistry<?> staticRegistry = getContext().getEndpointRegistry();
             int index = 0;
 
             for (RuntimeEndpointRegistry.Statistic stat : registry.getEndpointStatistics()) {
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedThreads.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedThreads.java
index 87d9c24be35..890e65beb15 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedThreads.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedThreads.java
@@ -120,7 +120,7 @@ public class ManagedThreads extends ManagedProcessor implements ManagedThreadsMB
     @Override
     public long getTaskQueueSize() {
         if (processor.getExecutorService() instanceof ThreadPoolExecutor) {
-            BlockingQueue queue = ((ThreadPoolExecutor) processor.getExecutorService()).getQueue();
+            BlockingQueue<Runnable> queue = ((ThreadPoolExecutor) processor.getExecutorService()).getQueue();
             return queue != null ? queue.size() : 0;
         } else {
             return 0;
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedTransformerRegistry.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedTransformerRegistry.java
index 79ac1ff8c3d..980de49d3ad 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedTransformerRegistry.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedTransformerRegistry.java
@@ -35,14 +35,14 @@ import org.apache.camel.spi.TransformerRegistry;
 
 @ManagedResource(description = "Managed TransformerRegistry")
 public class ManagedTransformerRegistry extends ManagedService implements ManagedTransformerRegistryMBean {
-    private final TransformerRegistry transformerRegistry;
+    private final TransformerRegistry<?> transformerRegistry;
 
-    public ManagedTransformerRegistry(CamelContext context, TransformerRegistry transformerRegistry) {
+    public ManagedTransformerRegistry(CamelContext context, TransformerRegistry<?> transformerRegistry) {
         super(context, transformerRegistry);
         this.transformerRegistry = transformerRegistry;
     }
 
-    public TransformerRegistry getTransformerRegistry() {
+    public TransformerRegistry<?> getTransformerRegistry() {
         return transformerRegistry;
     }
 
@@ -77,7 +77,6 @@ public class ManagedTransformerRegistry extends ManagedService implements Manage
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public TabularData listTransformers() {
         try {
             TabularData answer = new TabularDataSupport(CamelOpenMBeanTypes.listTransformersTabularType());
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedValidatorRegistry.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedValidatorRegistry.java
index bc58043223e..a5d64c8a35c 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedValidatorRegistry.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedValidatorRegistry.java
@@ -35,14 +35,14 @@ import org.apache.camel.spi.ValidatorRegistry;
 
 @ManagedResource(description = "Managed ValidatorRegistry")
 public class ManagedValidatorRegistry extends ManagedService implements ManagedValidatorRegistryMBean {
-    private final ValidatorRegistry validatorRegistry;
+    private final ValidatorRegistry<?> validatorRegistry;
 
-    public ManagedValidatorRegistry(CamelContext context, ValidatorRegistry validatorRegistry) {
+    public ManagedValidatorRegistry(CamelContext context, ValidatorRegistry<?> validatorRegistry) {
         super(context, validatorRegistry);
         this.validatorRegistry = validatorRegistry;
     }
 
-    public ValidatorRegistry getValidatorRegistry() {
+    public ValidatorRegistry<?> getValidatorRegistry() {
         return validatorRegistry;
     }
 
@@ -77,7 +77,6 @@ public class ManagedValidatorRegistry extends ManagedService implements ManagedV
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public TabularData listValidators() {
         try {
             TabularData answer = new TabularDataSupport(CamelOpenMBeanTypes.listValidatorsTabularType());
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/InputStreamIterator.java b/core/camel-support/src/main/java/org/apache/camel/support/InputStreamIterator.java
index b3876e92f62..829b3b88ea1 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/InputStreamIterator.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/InputStreamIterator.java
@@ -29,10 +29,10 @@ import org.apache.camel.TypeConverter;
  */
 public final class InputStreamIterator extends InputStream {
     private final TypeConverter converter;
-    private final Iterator it;
+    private final Iterator<?> it;
     private InputStream chunk;
 
-    public InputStreamIterator(TypeConverter converter, Iterator it) {
+    public InputStreamIterator(TypeConverter converter, Iterator<?> it) {
         this.converter = converter;
         this.it = it;
     }
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/NormalizedUri.java b/core/camel-support/src/main/java/org/apache/camel/support/NormalizedUri.java
index cae8153c33b..690820b99bb 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/NormalizedUri.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/NormalizedUri.java
@@ -26,7 +26,7 @@ import org.apache.camel.spi.NormalizedEndpointUri;
  */
 public final class NormalizedUri extends ValueHolder<String> implements NormalizedEndpointUri {
 
-    // must extends ValueHolder to let this class be used as key for Camels endpoint registry
+    // must extend ValueHolder to let this class be used as key for Camels endpoint registry
 
     private NormalizedUri(String value) {
         super(value);
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
index 8bb9053b2d3..1b2f7ee6d84 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java
@@ -915,7 +915,7 @@ public final class PropertyBindingSupport {
         if (reference && value instanceof String) {
             String str = value.toString();
             if (str.startsWith("#bean:")) {
-                // okay its a reference so swap to lookup this which is already supported in IntrospectionSupport
+                // okay it's a reference so swap to look up this which is already supported in IntrospectionSupport
                 refName = "#" + ((String) value).substring(6);
                 value = null;
             } else if (str.equals("#autowired")) {
@@ -1156,10 +1156,10 @@ public final class PropertyBindingSupport {
                 Class<?> parameterType = null;
                 try {
                     // our only hope is that the List has getter/setter that use a generic type to specify what kind of class
-                    // they contains so we can use that to know the parameter type
+                    // they contain, so we can use that to know the parameter type
                     Method method = introspection.getPropertyGetter(target.getClass(), key, ignoreCase);
                     if (method != null) {
-                        // its a list (List<com.foo.MyObject>) so we look for < >
+                        // it's a list (List<com.foo.MyObject>) so we look for < >
                         String typeName = method.getGenericReturnType().getTypeName();
                         String fqn = StringHelper.between(typeName, "<", ">");
                         if (fqn != null) {
@@ -1208,7 +1208,7 @@ public final class PropertyBindingSupport {
     }
 
     private static Method findBestSetterMethod(
-            CamelContext context, Class clazz, String name,
+            CamelContext context, Class<?> clazz, String name,
             boolean fluentBuilder, boolean allowPrivateSetter, boolean ignoreCase) {
         // is there a direct setter?
         final BeanIntrospection beanIntrospection = PluginHelper.getBeanIntrospection(context);
@@ -1273,7 +1273,7 @@ public final class PropertyBindingSupport {
     public static Object newInstanceConstructorParameters(CamelContext camelContext, Class<?> type, String parameters)
             throws Exception {
         String[] params = StringQuoteHelper.splitSafeQuote(parameters, ',', false);
-        Constructor found = findMatchingConstructor(type.getConstructors(), params);
+        Constructor<?> found = findMatchingConstructor(type.getConstructors(), params);
         if (found != null) {
             Object[] arr = new Object[found.getParameterCount()];
             for (int i = 0; i < found.getParameterCount(); i++) {
@@ -1313,11 +1313,11 @@ public final class PropertyBindingSupport {
      * @param  params       the parameters
      * @return              the constructor, or null if no matching constructor can be found
      */
-    private static Constructor findMatchingConstructor(Constructor<?>[] constructors, String[] params) {
-        List<Constructor> candidates = new ArrayList<>();
-        Constructor fallbackCandidate = null;
+    private static Constructor<?> findMatchingConstructor(Constructor<?>[] constructors, String[] params) {
+        List<Constructor<?>> candidates = new ArrayList<>();
+        Constructor<?> fallbackCandidate = null;
 
-        for (Constructor ctr : constructors) {
+        for (Constructor<?> ctr : constructors) {
             if (ctr.getParameterCount() != params.length) {
                 continue;
             }
@@ -1538,18 +1538,17 @@ public final class PropertyBindingSupport {
      * @throws Exception    is thrown if error resolving the bean, or if the value is invalid.
      */
     public static Object resolveBean(CamelContext camelContext, Object value) throws Exception {
-        if (!(value instanceof String)) {
+        if (!(value instanceof String strval)) {
             return value;
         }
 
-        String strval = (String) value;
         Object answer = value;
 
         // resolve placeholders
         strval = camelContext.resolvePropertyPlaceholders(strval);
 
         if (strval.startsWith("#class:")) {
-            // its a new class to be created
+            // it's a new class to be created
             String className = strval.substring(7);
             String factoryMethod = null;
             String parameters = null;
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java b/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java
index 76b74b4fd33..bda24e6bc0d 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java
@@ -117,22 +117,23 @@ public final class RestConsumerContextPathMatcher {
      * @param  consumerPaths the list of consumer context path details
      * @return               the best matched consumer, or <tt>null</tt> if none could be determined.
      */
-    public static ConsumerPath matchBestPath(String requestMethod, String requestPath, List<ConsumerPath> consumerPaths) {
-        ConsumerPath answer = null;
+    public static <
+            T> ConsumerPath<T> matchBestPath(String requestMethod, String requestPath, List<ConsumerPath<T>> consumerPaths) {
+        ConsumerPath<T> answer = null;
 
-        List<ConsumerPath> candidates = new ArrayList<>();
+        List<ConsumerPath<T>> candidates = new ArrayList<>();
 
         // first match by http method
-        for (ConsumerPath entry : consumerPaths) {
+        for (ConsumerPath<T> entry : consumerPaths) {
             if (matchRestMethod(requestMethod, entry.getRestrictMethod())) {
                 candidates.add(entry);
             }
         }
 
         // then see if we got a direct match
-        Iterator<ConsumerPath> it = candidates.iterator();
+        Iterator<ConsumerPath<T>> it = candidates.iterator();
         while (it.hasNext()) {
-            ConsumerPath consumer = it.next();
+            ConsumerPath<T> consumer = it.next();
             if (matchRestPath(requestPath, consumer.getConsumerPath(), false)) {
                 answer = consumer;
                 break;
@@ -147,7 +148,7 @@ public final class RestConsumerContextPathMatcher {
             // then try again to see if we can find a direct match
             it = candidates.iterator();
             while (it.hasNext()) {
-                ConsumerPath consumer = it.next();
+                ConsumerPath<T> consumer = it.next();
                 if (matchRestPath(requestPath, consumer.getConsumerPath(), false)) {
                     answer = consumer;
                     break;
@@ -172,7 +173,7 @@ public final class RestConsumerContextPathMatcher {
         // then match by wildcard path
         it = candidates.iterator();
         while (it.hasNext()) {
-            ConsumerPath consumer = it.next();
+            ConsumerPath<?> consumer = it.next();
             // filter non matching paths
             if (!matchRestPath(requestPath, consumer.getConsumerPath(), true)) {
                 it.remove();
@@ -180,22 +181,22 @@ public final class RestConsumerContextPathMatcher {
         }
 
         // if there is multiple candidates with wildcards then pick anyone with the least number of wildcards
-        ConsumerPath best = null;
-        Map<Integer, List<ConsumerPath>> pathMap = new HashMap<>();
+        ConsumerPath<T> best = null;
+        Map<Integer, List<ConsumerPath<T>>> pathMap = new HashMap<>();
         if (candidates.size() > 1) {
             it = candidates.iterator();
             while (it.hasNext()) {
-                ConsumerPath entry = it.next();
+                ConsumerPath<T> entry = it.next();
                 int wildcards = countWildcards(entry.getConsumerPath());
                 if (wildcards > 0) {
-                    List<ConsumerPath> consumerPathsLst = pathMap.computeIfAbsent(wildcards, key -> new ArrayList<>());
+                    List<ConsumerPath<T>> consumerPathsLst = pathMap.computeIfAbsent(wildcards, key -> new ArrayList<>());
                     consumerPathsLst.add(entry);
                 }
             }
 
             OptionalInt min = pathMap.keySet().stream().mapToInt(Integer::intValue).min();
             if (min.isPresent()) {
-                List<ConsumerPath> bestConsumerPaths = pathMap.get(min.getAsInt());
+                List<ConsumerPath<T>> bestConsumerPaths = pathMap.get(min.getAsInt());
                 if (bestConsumerPaths.size() > 1 && !canBeAmbiguous(requestMethod, requestMethod)) {
                     String exceptionMsg = "Ambiguous paths " + bestConsumerPaths.stream().map(ConsumerPath::getConsumerPath)
                             .collect(Collectors.joining(",")) + " for request path " + requestPath;
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
index 9a6d7fee913..a82c23085f6 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
@@ -1309,7 +1309,7 @@ public class ExpressionBuilder {
             @Override
             public Object evaluate(Exchange exchange) {
                 Object value = expression.evaluate(exchange, Object.class);
-                Iterator it = typeConverter.tryConvertTo(Iterator.class, exchange, value);
+                Iterator<?> it = typeConverter.tryConvertTo(Iterator.class, exchange, value);
                 if (it != null) {
                     // skip first
                     it.next();
@@ -1705,8 +1705,7 @@ public class ExpressionBuilder {
                 StringBuilder buffer = new StringBuilder();
                 Collection<?> col = optimized != null ? optimized : expressions;
                 for (Object obj : col) {
-                    if (obj instanceof Expression) {
-                        Expression expression = (Expression) obj;
+                    if (obj instanceof Expression expression) {
                         String text = expression.evaluate(exchange, String.class);
                         if (text != null) {
                             buffer.append(text);
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/jndi/JndiBeanRepository.java b/core/camel-support/src/main/java/org/apache/camel/support/jndi/JndiBeanRepository.java
index b590066ffc7..6eb79370f03 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/jndi/JndiBeanRepository.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/jndi/JndiBeanRepository.java
@@ -37,14 +37,14 @@ import org.apache.camel.spi.BeanRepository;
 public class JndiBeanRepository implements BeanRepository {
 
     private Context context;
-    private Map environment;
+    private Map<?, ?> environment;
     private final boolean standalone;
 
     public JndiBeanRepository() {
         this.standalone = false;
     }
 
-    public JndiBeanRepository(Map environment) {
+    public JndiBeanRepository(Map<?, ?> environment) {
         this.environment = environment;
         this.standalone = false;
     }
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/management/MBeanInfoAssembler.java b/core/camel-support/src/main/java/org/apache/camel/support/management/MBeanInfoAssembler.java
index 3a54f45b492..ae28c64e642 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/management/MBeanInfoAssembler.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/management/MBeanInfoAssembler.java
@@ -60,7 +60,7 @@ public class MBeanInfoAssembler implements Service {
     private final BeanIntrospection beanIntrospection;
 
     // use a cache to speedup gathering JMX MBeanInfo for known classes
-    // use a weak cache as we dont want the cache to keep around as it reference classes
+    // use a weak cache as we don't want the cache to keep around as it reference classes
     // which could prevent classloader to unload classes if being referenced from this cache
     private Map<Class<?>, MBeanAttributesAndOperations> cache;
 
@@ -76,10 +76,9 @@ public class MBeanInfoAssembler implements Service {
     @Override
     public void stop() {
         if (cache != null) {
-            if (LOG.isDebugEnabled() && cache instanceof LRUCache) {
-                LRUCache cache = (LRUCache) this.cache;
-                LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", cache.size(), cache.getHits(),
-                        cache.getMisses(), cache.getEvicted());
+            if (LOG.isDebugEnabled() && cache instanceof LRUCache<Class<?>, MBeanAttributesAndOperations> lruCache) {
+                LOG.debug("Clearing cache[size={}, hits={}, misses={}, evicted={}]", lruCache.size(), lruCache.getHits(),
+                        lruCache.getMisses(), lruCache.getEvicted());
             }
             cache.clear();
         }
@@ -123,21 +122,21 @@ public class MBeanInfoAssembler implements Service {
         // extract details from default managed bean
         if (defaultManagedBean != null) {
             extractAttributesAndOperations(camelContext, defaultManagedBean.getClass(), attributes, operations);
-            extractMbeanAttributes(defaultManagedBean, attributes, mBeanAttributes, mBeanOperations);
-            extractMbeanOperations(defaultManagedBean, operations, mBeanOperations);
+            extractMbeanAttributes(attributes, mBeanAttributes, mBeanOperations);
+            extractMbeanOperations(operations, mBeanOperations);
             extractMbeanNotifications(defaultManagedBean, mBeanNotifications);
         }
 
         // extract details from custom managed bean
         if (customManagedBean != null) {
             extractAttributesAndOperations(camelContext, customManagedBean.getClass(), attributes, operations);
-            extractMbeanAttributes(customManagedBean, attributes, mBeanAttributes, mBeanOperations);
-            extractMbeanOperations(customManagedBean, operations, mBeanOperations);
+            extractMbeanAttributes(attributes, mBeanAttributes, mBeanOperations);
+            extractMbeanOperations(operations, mBeanOperations);
             extractMbeanNotifications(customManagedBean, mBeanNotifications);
         }
 
         // create the ModelMBeanInfo
-        String name = getName(customManagedBean != null ? customManagedBean : defaultManagedBean, objectName);
+        String name = getName(customManagedBean != null ? customManagedBean : defaultManagedBean);
         String description = getDescription(customManagedBean != null ? customManagedBean : defaultManagedBean, objectName);
         ModelMBeanAttributeInfo[] arrayAttributes
                 = mBeanAttributes.toArray(new ModelMBeanAttributeInfo[0]);
@@ -157,7 +156,7 @@ public class MBeanInfoAssembler implements Service {
             Set<ManagedOperationInfo> operations) {
         MBeanAttributesAndOperations cached = cache.get(managedClass);
         if (cached == null) {
-            doExtractAttributesAndOperations(camelContext, managedClass, attributes, operations);
+            doExtractAttributesAndOperations(managedClass, attributes, operations);
             cached = new MBeanAttributesAndOperations();
             cached.attributes = new LinkedHashMap<>(attributes);
             cached.operations = new LinkedHashSet<>(operations);
@@ -175,10 +174,10 @@ public class MBeanInfoAssembler implements Service {
     }
 
     private void doExtractAttributesAndOperations(
-            CamelContext camelContext, Class<?> managedClass, Map<String, ManagedAttributeInfo> attributes,
+            Class<?> managedClass, Map<String, ManagedAttributeInfo> attributes,
             Set<ManagedOperationInfo> operations) {
         // extract the class
-        doDoExtractAttributesAndOperations(camelContext, managedClass, attributes, operations);
+        doDoExtractAttributesAndOperations(managedClass, attributes, operations);
 
         // and then any sub classes
         if (managedClass.getSuperclass() != null) {
@@ -186,7 +185,7 @@ public class MBeanInfoAssembler implements Service {
             // skip any JDK classes
             if (!clazz.getName().startsWith("java")) {
                 LOG.trace("Extracting attributes and operations from sub class: {}", clazz);
-                doExtractAttributesAndOperations(camelContext, clazz, attributes, operations);
+                doExtractAttributesAndOperations(clazz, attributes, operations);
             }
         }
 
@@ -199,13 +198,13 @@ public class MBeanInfoAssembler implements Service {
                     continue;
                 }
                 LOG.trace("Extracting attributes and operations from implemented interface: {}", clazz);
-                doExtractAttributesAndOperations(camelContext, clazz, attributes, operations);
+                doExtractAttributesAndOperations(clazz, attributes, operations);
             }
         }
     }
 
     private void doDoExtractAttributesAndOperations(
-            CamelContext camelContext, Class<?> managedClass, Map<String, ManagedAttributeInfo> attributes,
+            Class<?> managedClass, Map<String, ManagedAttributeInfo> attributes,
             Set<ManagedOperationInfo> operations) {
         LOG.trace("Extracting attributes and operations from class: {}", managedClass);
 
@@ -270,7 +269,7 @@ public class MBeanInfoAssembler implements Service {
     }
 
     private void extractMbeanAttributes(
-            Object managedBean, Map<String, ManagedAttributeInfo> attributes,
+            Map<String, ManagedAttributeInfo> attributes,
             Set<ModelMBeanAttributeInfo> mBeanAttributes, Set<ModelMBeanOperationInfo> mBeanOperations)
             throws IntrospectionException {
 
@@ -305,11 +304,11 @@ public class MBeanInfoAssembler implements Service {
     }
 
     private void extractMbeanOperations(
-            Object managedBean, Set<ManagedOperationInfo> operations, Set<ModelMBeanOperationInfo> mBeanOperations) {
+            Set<ManagedOperationInfo> operations, Set<ModelMBeanOperationInfo> mBeanOperations) {
         for (ManagedOperationInfo info : operations) {
-            ModelMBeanOperationInfo mbean = new ModelMBeanOperationInfo(info.getDescription(), info.getOperation());
+            ModelMBeanOperationInfo mbean = new ModelMBeanOperationInfo(info.description(), info.operation());
             Descriptor opDesc = mbean.getDescriptor();
-            opDesc.setField("mask", info.isMask() ? "true" : "false");
+            opDesc.setField("mask", info.mask() ? "true" : "false");
             mbean.setDescriptor(opDesc);
             mBeanOperations.add(mbean);
             LOG.trace("Assembled operation: {}", mbean);
@@ -333,7 +332,7 @@ public class MBeanInfoAssembler implements Service {
         return mr != null ? mr.description() : "";
     }
 
-    private String getName(Object managedBean, String objectName) {
+    private String getName(Object managedBean) {
         return managedBean.getClass().getName();
     }
 
@@ -387,28 +386,7 @@ public class MBeanInfoAssembler implements Service {
         }
     }
 
-    private static final class ManagedOperationInfo {
-        private final String description;
-        private final Method operation;
-        private final boolean mask;
-
-        private ManagedOperationInfo(String description, Method operation, boolean mask) {
-            this.description = description;
-            this.operation = operation;
-            this.mask = mask;
-        }
-
-        public String getDescription() {
-            return description;
-        }
-
-        public Method getOperation() {
-            return operation;
-        }
-
-        public boolean isMask() {
-            return mask;
-        }
+    private record ManagedOperationInfo(String description, Method operation, boolean mask) {
 
         @Override
         public String toString() {
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java b/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java
index 029d1d566a9..085b4da115b 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java
@@ -181,8 +181,8 @@ public class FileIdempotentRepository extends ServiceSupport implements Idempote
     public void clear() {
         synchronized (cache) {
             cache.clear();
-            if (cache instanceof LRUCache) {
-                ((LRUCache) cache).cleanUp();
+            if (cache instanceof LRUCache<String, Object> lruCache) {
+                lruCache.cleanUp();
             }
             // clear file store
             clearStore();
@@ -272,8 +272,8 @@ public class FileIdempotentRepository extends ServiceSupport implements Idempote
     public synchronized void reset() throws IOException {
         synchronized (cache) {
             // run the cleanup task first
-            if (cache instanceof LRUCache) {
-                ((LRUCache) cache).cleanUp();
+            if (cache instanceof LRUCache<String, Object> lruCache) {
+                lruCache.cleanUp();
             }
             cache.clear();
             loadStore();
@@ -445,8 +445,8 @@ public class FileIdempotentRepository extends ServiceSupport implements Idempote
      */
     protected void cleanup() {
         // run the cleanup task first
-        if (cache instanceof LRUCache) {
-            ((LRUCache) cache).cleanUp();
+        if (cache instanceof LRUCache<String, Object> lruCache) {
+            lruCache.cleanUp();
         }
     }
 
@@ -503,8 +503,8 @@ public class FileIdempotentRepository extends ServiceSupport implements Idempote
     @Override
     protected void doStop() throws Exception {
         // run the cleanup task first
-        if (cache instanceof LRUCache) {
-            ((LRUCache) cache).cleanUp();
+        if (cache instanceof LRUCache<String, Object> lruCache) {
+            lruCache.cleanUp();
         }
 
         cache.clear();
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/resume/AdapterHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/resume/AdapterHelper.java
index 7a6284372f8..7ecb10596e2 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/resume/AdapterHelper.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/resume/AdapterHelper.java
@@ -39,7 +39,7 @@ public final class AdapterHelper {
     private AdapterHelper() {
     }
 
-    public static ResumeAdapter eval(CamelContext context, ResumeAware resumeAware, ResumeStrategy resumeStrategy) {
+    public static ResumeAdapter eval(CamelContext context, ResumeAware<?> resumeAware, ResumeStrategy resumeStrategy) {
         assert context != null;
         assert resumeAware != null;
         assert resumeStrategy != null;
@@ -59,8 +59,7 @@ public final class AdapterHelper {
         final ResumeAdapter resumeAdapter = adapterOptional.get();
         LOG.debug("Using the acquired resume adapter: {}", resumeAdapter.getClass().getName());
 
-        if (resumeAdapter instanceof Cacheable) {
-            final Cacheable cacheableAdapter = (Cacheable) resumeAdapter;
+        if (resumeAdapter instanceof Cacheable cacheableAdapter) {
             final ResumeStrategyConfiguration resumeStrategyConfiguration = resumeStrategy.getResumeStrategyConfiguration();
 
             final ResumeCache<?> resumeCache = resumeStrategyConfiguration.getResumeCache();
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/resume/BasicResumeStrategyConfigurationBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/resume/BasicResumeStrategyConfigurationBuilder.java
index bb507ae0e7a..9eb6ecf4ac2 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/resume/BasicResumeStrategyConfigurationBuilder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/resume/BasicResumeStrategyConfigurationBuilder.java
@@ -29,7 +29,7 @@ import org.apache.camel.resume.cache.ResumeCache;
  * @param <Y> The type of the {@link ResumeStrategyConfiguration} that will be built by the builder
  */
 public abstract class BasicResumeStrategyConfigurationBuilder<
-        T extends BasicResumeStrategyConfigurationBuilder, Y extends ResumeStrategyConfiguration>
+        T extends BasicResumeStrategyConfigurationBuilder<T, Y>, Y extends ResumeStrategyConfiguration>
         implements ResumeStrategyConfigurationBuilder<T, Y> {
     protected Cacheable.FillPolicy cacheFillPolicy = Cacheable.FillPolicy.MAXIMIZING;
     protected ResumeCache<?> resumeCache;
diff --git a/core/camel-support/src/test/java/org/apache/camel/support/RestConsumerContextPathMatcherTest.java b/core/camel-support/src/test/java/org/apache/camel/support/RestConsumerContextPathMatcherTest.java
index cc0175140b0..a9b3fac1b72 100644
--- a/core/camel-support/src/test/java/org/apache/camel/support/RestConsumerContextPathMatcherTest.java
+++ b/core/camel-support/src/test/java/org/apache/camel/support/RestConsumerContextPathMatcherTest.java
@@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class RestConsumerContextPathMatcherTest {
 
-    private static final class MockConsumerPath implements RestConsumerContextPathMatcher.ConsumerPath {
+    private static final class MockConsumerPath implements RestConsumerContextPathMatcher.ConsumerPath<MockConsumerPath> {
         private final String method;
         private final String consumerPath;
 
@@ -46,7 +46,7 @@ public class RestConsumerContextPathMatcherTest {
         }
 
         @Override
-        public Object getConsumer() {
+        public MockConsumerPath getConsumer() {
             return null;
         }
 
@@ -58,7 +58,7 @@ public class RestConsumerContextPathMatcherTest {
 
     @Test
     public void testRestConsumerContextPathMatcherWithAmbiguousPaths() {
-        List<RestConsumerContextPathMatcher.ConsumerPath> consumerPaths = new ArrayList<>();
+        List<RestConsumerContextPathMatcher.ConsumerPath<MockConsumerPath>> consumerPaths = new ArrayList<>();
         consumerPaths.add(new MockConsumerPath("GET", "/camel/{a}/b/{c}"));
         consumerPaths.add(new MockConsumerPath("GET", "/camel/a/{b}/{c}"));
 
@@ -71,11 +71,11 @@ public class RestConsumerContextPathMatcherTest {
 
     @Test
     public void testRestConsumerContextPathMatcherSuccess() {
-        List<RestConsumerContextPathMatcher.ConsumerPath> consumerPaths = new ArrayList<>();
+        List<RestConsumerContextPathMatcher.ConsumerPath<MockConsumerPath>> consumerPaths = new ArrayList<>();
         consumerPaths.add(new MockConsumerPath("GET", "/camel/a/b/{c}"));
         consumerPaths.add(new MockConsumerPath("GET", "/camel/aa/{b}/{c}"));
 
-        RestConsumerContextPathMatcher.ConsumerPath path = RestConsumerContextPathMatcher.matchBestPath("GET",
+        RestConsumerContextPathMatcher.ConsumerPath<?> path = RestConsumerContextPathMatcher.matchBestPath("GET",
                 "/camel/a/b/3", consumerPaths);
         assertEquals(path.getConsumerPath(), "/camel/a/b/{c}");
     }
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
index 7e80b6cc590..512e6a7de70 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
@@ -52,19 +52,15 @@ public final class CollectionHelper {
      */
     public static Integer size(Object value) {
         if (value != null) {
-            if (value instanceof Collection) {
-                Collection<?> collection = (Collection<?>) value;
+            if (value instanceof Collection<?> collection) {
                 return collection.size();
-            } else if (value instanceof Map) {
-                Map<?, ?> map = (Map<?, ?>) value;
+            } else if (value instanceof Map<?, ?> map) {
                 return map.size();
-            } else if (value instanceof Object[]) {
-                Object[] array = (Object[]) value;
+            } else if (value instanceof Object[] array) {
                 return array.length;
             } else if (value.getClass().isArray()) {
                 return Array.getLength(value);
-            } else if (value instanceof NodeList) {
-                NodeList nodeList = (NodeList) value;
+            } else if (value instanceof NodeList nodeList) {
                 return nodeList.getLength();
             }
         }
@@ -141,8 +137,7 @@ public final class CollectionHelper {
             Object value = entry.getValue();
             String newKey = prefix.isEmpty() ? key : prefix + separator + key;
 
-            if (value instanceof Map) {
-                Map map = (Map) value;
+            if (value instanceof Map map) {
                 doFlattenKeysInMap(map, newKey, separator, target);
             } else {
                 target.put(newKey, value);
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
index c5c3ee0f587..c8918dbc1a1 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
@@ -71,7 +71,7 @@ public final class ReflectionHelper {
          *
          * @param clazz the class to operate on
          */
-        void doWith(Class clazz) throws IllegalArgumentException, IllegalAccessException;
+        void doWith(Class<?> clazz) throws IllegalArgumentException, IllegalAccessException;
     }
 
     /**
@@ -82,8 +82,8 @@ public final class ReflectionHelper {
      */
     public static void doWithClasses(Class<?> clazz, ClassCallback cc) throws IllegalArgumentException {
         // and then nested classes
-        Class[] classes = clazz.getDeclaredClasses();
-        for (Class aClazz : classes) {
+        Class<?>[] classes = clazz.getDeclaredClasses();
+        for (Class<?> aClazz : classes) {
             try {
                 cc.doWith(aClazz);
             } catch (IllegalAccessException ex) {
@@ -179,7 +179,7 @@ public final class ReflectionHelper {
 
     public static void setField(Field f, Object instance, Object value) {
         try {
-            boolean oldAccessible = f.isAccessible();
+            boolean oldAccessible = f.canAccess(instance);
             boolean shouldSetAccessible = !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
             if (shouldSetAccessible) {
                 f.setAccessible(true);
@@ -195,7 +195,7 @@ public final class ReflectionHelper {
 
     public static Object getField(Field f, Object instance) {
         try {
-            boolean oldAccessible = f.isAccessible();
+            boolean oldAccessible = f.canAccess(instance);
             boolean shouldSetAccessible = !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
             if (shouldSetAccessible) {
                 f.setAccessible(true);
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java b/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
index 9e1df36550c..faba4a36f35 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
@@ -318,7 +318,6 @@ public final class URISupport {
      * @see              #RAW_TOKEN_START
      * @see              #RAW_TOKEN_END
      */
-    @SuppressWarnings("unchecked")
     public static void resolveRawParameterValues(Map<String, Object> parameters) {
         for (Map.Entry<String, Object> entry : parameters.entrySet()) {
             if (entry.getValue() == null) {
@@ -438,7 +437,7 @@ public final class URISupport {
      */
     public static String createQueryString(Map<String, Object> options) {
         final Set<String> keySet = options.keySet();
-        return createQueryString(keySet.toArray(new String[keySet.size()]), options, true);
+        return createQueryString(keySet.toArray(new String[0]), options, true);
     }
 
     /**
@@ -493,7 +492,7 @@ public final class URISupport {
 
     @Deprecated
     public static String createQueryString(Collection<String> sortedKeys, Map<String, Object> options, boolean encode) {
-        return createQueryString(sortedKeys.toArray(new String[sortedKeys.size()]), options, encode);
+        return createQueryString(sortedKeys.toArray(new String[0]), options, encode);
     }
 
     private static void appendQueryStringParameter(String key, String value, StringBuilder rc, boolean encode) {
@@ -654,7 +653,7 @@ public final class URISupport {
             } else {
                 // reorder parameters a..z
                 final Set<String> keySet = parameters.keySet();
-                final String[] parametersArray = keySet.toArray(new String[keySet.size()]);
+                final String[] parametersArray = keySet.toArray(new String[0]);
                 Arrays.sort(parametersArray);
 
                 // build uri object with sorted parameters
@@ -783,7 +782,7 @@ public final class URISupport {
                 } else {
                     // reorder parameters a..z
                     final Set<String> keySet = parameters.keySet();
-                    final String[] parametersArray = keySet.toArray(new String[keySet.size()]);
+                    final String[] parametersArray = keySet.toArray(new String[0]);
                     Arrays.sort(parametersArray);
 
                     // build uri object with sorted parameters
diff --git a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
index 8cfba8da20b..5ca7e650c3f 100644
--- a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
+++ b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
@@ -123,7 +123,6 @@ public final class JaxbHelper {
      * If the route has been built with endpoint-dsl, then the model will not have uri set which then cannot be included
      * in the JAXB model dump
      */
-    @SuppressWarnings("unchecked")
     public static void resolveEndpointDslUris(RouteDefinition route) {
         FromDefinition from = route.getInput();
         if (from != null && from.getEndpointConsumerBuilder() != null) {
@@ -416,8 +415,7 @@ public final class JaxbHelper {
 
         // can either be routes or a single route
         TemplatedRoutesDefinition answer;
-        if (result instanceof TemplatedRouteDefinition) {
-            TemplatedRouteDefinition templatedRoute = (TemplatedRouteDefinition) result;
+        if (result instanceof TemplatedRouteDefinition templatedRoute) {
             answer = new TemplatedRoutesDefinition();
             answer.getTemplatedRoutes().add(templatedRoute);
         } else if (result instanceof TemplatedRoutesDefinition) {
@@ -462,8 +460,7 @@ public final class JaxbHelper {
 
         // can either be routes or a single route
         RestsDefinition answer;
-        if (result instanceof RestDefinition) {
-            RestDefinition rest = (RestDefinition) result;
+        if (result instanceof RestDefinition rest) {
             answer = new RestsDefinition();
             answer.getRests().add(rest);
         } else if (result instanceof RestsDefinition) {
diff --git a/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/io/YamlWriter.java b/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/io/YamlWriter.java
index a4ed6082b1f..b07cc2cfdce 100644
--- a/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/io/YamlWriter.java
+++ b/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/io/YamlWriter.java
@@ -372,7 +372,6 @@ public class YamlWriter extends ServiceSupport implements CamelContextAware {
         return arr;
     }
 
-    @SuppressWarnings("unchecked")
     private JsonObject asJSonNode(EipModel model) {
         JsonObject answer = new JsonObject();
         JsonObject jo = new JsonObject();
@@ -388,7 +387,7 @@ public class YamlWriter extends ServiceSupport implements CamelContextAware {
             if (value != null) {
                 if (value instanceof Collection<?>) {
                     Collection<?> col = (Collection<?>) value;
-                    List list = new ArrayList<>();
+                    List<Object> list = new ArrayList<>();
                     for (Object v : col) {
                         Object r = v;
                         if (r instanceof EipModel) {
@@ -428,7 +427,7 @@ public class YamlWriter extends ServiceSupport implements CamelContextAware {
         // special for choice
         boolean array = isArray(model, name);
         if (array) {
-            List list = (List) model.getMetadata().get(name);
+            List<Object> list = (List<Object>) model.getMetadata().get(name);
             if (list == null) {
                 list = new ArrayList<>();
                 model.getMetadata().put(name, list);
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ActivemqComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ActivemqComponentBuilderFactory.java
index 3dfe60f2b7d..8269e8ba951 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ActivemqComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ActivemqComponentBuilderFactory.java
@@ -198,7 +198,7 @@ public interface ActivemqComponentBuilderFactory {
         }
         /**
          * Enables or disables whether a PooledConnectionFactory will be used so
-         * that when messages are sent to ActiveMQ from outside of a message
+         * that when messages are sent to ActiveMQ from outside a message
          * consuming thread, pooling will be used rather than the default with
          * the Spring JmsTemplate which will create a new connection, session,
          * producer for each message then close them all down again. The default
@@ -219,7 +219,7 @@ public interface ActivemqComponentBuilderFactory {
         }
         /**
          * Enables or disables whether a Spring SingleConnectionFactory will be
-         * used so that when messages are sent to ActiveMQ from outside of a
+         * used so that when messages are sent to ActiveMQ from outside a
          * message consuming thread, pooling will be used rather than the
          * default with the Spring JmsTemplate which will create a new
          * connection, session, producer for each message then close them all
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
index 0760a59eb6b..c21578c3072 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CodeRestGenerator.java
@@ -101,7 +101,7 @@ public class CodeRestGenerator extends CamelCommand {
     private JsonNode readNodeFromYaml() throws FileNotFoundException {
         final ObjectMapper mapper = new ObjectMapper();
         Yaml loader = new Yaml(new SafeConstructor(new LoaderOptions()));
-        Map map = loader.load(new FileInputStream(Paths.get(input).toFile()));
+        Map<?, ?> map = loader.load(new FileInputStream(Paths.get(input).toFile()));
         return mapper.convertValue(map, JsonNode.class);
     }
 
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/KameletCatalogHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/KameletCatalogHelper.java
index 3b0da7c4cb0..280186ca174 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/KameletCatalogHelper.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/KameletCatalogHelper.java
@@ -184,9 +184,10 @@ public final class KameletCatalogHelper {
         Method m = kamelet.getClass().getMethod("getMetadata");
         Object meta = ObjectHelper.invokeMethod(m, kamelet);
         m = meta.getClass().getMethod("getLabels");
-        Map labels = (Map) ObjectHelper.invokeMethod(m, meta);
+        @SuppressWarnings("unchecked")
+        Map<String, String> labels = (Map<String, String>) ObjectHelper.invokeMethod(m, meta);
         if (labels != null) {
-            return (String) labels.get("camel.apache.org/kamelet.type");
+            return labels.get("camel.apache.org/kamelet.type");
         }
         return null;
     }
@@ -195,9 +196,10 @@ public final class KameletCatalogHelper {
         Method m = kamelet.getClass().getMethod("getMetadata");
         Object meta = ObjectHelper.invokeMethod(m, kamelet);
         m = meta.getClass().getMethod("getAnnotations");
-        Map anns = (Map) ObjectHelper.invokeMethod(m, meta);
+        @SuppressWarnings("unchecked")
+        Map<String, String> anns = (Map<String, String>) ObjectHelper.invokeMethod(m, meta);
         if (anns != null) {
-            return (String) anns.get("camel.apache.org/kamelet.support.level");
+            return anns.get("camel.apache.org/kamelet.support.level");
         }
         return null;
     }
@@ -225,6 +227,7 @@ public final class KameletCatalogHelper {
         Method m = kamelet.getClass().getMethod("getSpec");
         Object spec = ObjectHelper.invokeMethod(m, kamelet);
         m = spec.getClass().getMethod("getDependencies");
+        @SuppressWarnings("unchecked")
         List<Object> list = (List<Object>) ObjectHelper.invokeMethod(m, spec);
         if (list != null && !list.isEmpty()) {
             for (var en : list) {
diff --git a/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java b/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
index 9857ad32750..c552483515b 100644
--- a/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
+++ b/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
@@ -75,14 +75,14 @@ public final class AWSSDKClientUtils {
      * @param  property              the system property used to figure out if it's local service or not
      * @param  name                  the service name
      * @param  clientBuilderSupplier A supplier type for creating the builder class
-     * @param  yClass                The client type to be generated
-     * @param  <T>
-     * @param  <Y>
+     * @param  <T>                   The type of builder that should be returned by the fluent builder methods in
+     *                               {@link AwsClientBuilder} interface.
+     * @param  <Y>                   The type of client generated by the {@link AwsClientBuilder} builder.
      * @return                       A new client of the given type
      */
-    private static <T extends AwsClientBuilder, Y extends SdkClient> Y newClient(
+    private static <T extends AwsClientBuilder<T, Y>, Y extends SdkClient> Y newClient(
             String property, String name,
-            Supplier<T> clientBuilderSupplier, Class<Y> yClass) {
+            Supplier<T> clientBuilderSupplier) {
         T clientBuilder = clientBuilderSupplier.get();
 
         LOG.debug("Creating a new AWS v2 {} client", name);
@@ -108,12 +108,7 @@ public final class AWSSDKClientUtils {
             ((S3ClientBuilder) clientBuilder).forcePathStyle(true);
         }
 
-        Object o = clientBuilder.build();
-        if (yClass.isInstance(o)) {
-            return (Y) o;
-        }
-
-        throw new UnsupportedOperationException("Invalid class type for AWS client");
+        return clientBuilder.build();
     }
 
     /**
@@ -121,67 +116,66 @@ public final class AWSSDKClientUtils {
      *
      * @param  name                  the service name
      * @param  clientBuilderSupplier A supplier type for creating the builder class
-     * @param  yClass                The client type to be generated
-     * @param  <T>
-     * @param  <Y>
+     * @param  <T>                   The type of builder that should be returned by the fluent builder methods in
+     *                               {@link AwsClientBuilder} interface.
+     * @param  <Y>                   The type of client generated by the {@link AwsClientBuilder} builder.
      * @return                       A new client of the given type
      */
-    private static <T extends AwsClientBuilder, Y extends SdkClient> Y newClient(
+    private static <T extends AwsClientBuilder<T, Y>, Y extends SdkClient> Y newClient(
             String name,
-            Supplier<T> clientBuilderSupplier, Class<Y> yClass) {
-        return newClient("aws-service.instance.type", name, clientBuilderSupplier, yClass);
+            Supplier<T> clientBuilderSupplier) {
+        return newClient("aws-service.instance.type", name, clientBuilderSupplier);
     }
 
     public static KinesisClient newKinesisClient() {
-        return newClient("aws-service.kinesis.instance.type", "Kinesis", KinesisClient::builder,
-                KinesisClient.class);
+        return newClient("aws-service.kinesis.instance.type", "Kinesis", KinesisClient::builder);
     }
 
     public static SqsClient newSQSClient() {
-        return newClient("SQS", SqsClient::builder, SqsClient.class);
+        return newClient("SQS", SqsClient::builder);
     }
 
     public static S3Client newS3Client() {
-        return newClient("S3", S3Client::builder, S3Client.class);
+        return newClient("S3", S3Client::builder);
     }
 
     public static SnsClient newSNSClient() {
-        return newClient("SNS", SnsClient::builder, SnsClient.class);
+        return newClient("SNS", SnsClient::builder);
     }
 
     public static CloudWatchClient newCloudWatchClient() {
-        return newClient("Cloud Watch", CloudWatchClient::builder, CloudWatchClient.class);
+        return newClient("Cloud Watch", CloudWatchClient::builder);
     }
 
     public static Ec2Client newEC2Client() {
-        return newClient("EC2", Ec2Client::builder, Ec2Client.class);
+        return newClient("EC2", Ec2Client::builder);
     }
 
     public static EventBridgeClient newEventBridgeClient() {
-        return newClient("EventBridge", EventBridgeClient::builder, EventBridgeClient.class);
+        return newClient("EventBridge", EventBridgeClient::builder);
     }
 
     public static IamClient newIAMClient() {
-        return newClient("EventBridge", IamClient::builder, IamClient.class);
+        return newClient("EventBridge", IamClient::builder);
     }
 
     public static KmsClient newKMSClient() {
-        return newClient("KMS", KmsClient::builder, KmsClient.class);
+        return newClient("KMS", KmsClient::builder);
     }
 
     public static LambdaClient newLambdaClient() {
-        return newClient("Lambda", LambdaClient::builder, LambdaClient.class);
+        return newClient("Lambda", LambdaClient::builder);
     }
 
     public static SecretsManagerClient newSecretsManagerClient() {
-        return newClient("SecretsManager", SecretsManagerClient::builder, SecretsManagerClient.class);
+        return newClient("SecretsManager", SecretsManagerClient::builder);
     }
 
     public static StsClient newSTSClient() {
-        return newClient("STS", StsClient::builder, StsClient.class);
+        return newClient("STS", StsClient::builder);
     }
 
     public static DynamoDbClient newDynamoDBClient() {
-        return newClient("DynamoDB", DynamoDbClient::builder, DynamoDbClient.class);
+        return newClient("DynamoDB", DynamoDbClient::builder);
     }
 }
diff --git a/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/ReflectionHelper.java b/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/ReflectionHelper.java
index 563c4725947..5d83fa68bc9 100644
--- a/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/ReflectionHelper.java
+++ b/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/ReflectionHelper.java
@@ -73,7 +73,7 @@ public final class ReflectionHelper {
          *
          * @param clazz the class to operate on
          */
-        void doWith(Class clazz) throws IllegalArgumentException, IllegalAccessException;
+        void doWith(Class<?> clazz) throws IllegalArgumentException, IllegalAccessException;
     }
 
     /**
@@ -84,8 +84,8 @@ public final class ReflectionHelper {
      */
     public static void doWithClasses(Class<?> clazz, ClassCallback cc) throws IllegalArgumentException {
         // and then nested classes
-        Class[] classes = clazz.getDeclaredClasses();
-        for (Class aClazz : classes) {
+        Class<?>[] classes = clazz.getDeclaredClasses();
+        for (Class<?> aClazz : classes) {
             try {
                 cc.doWith(aClazz);
             } catch (IllegalAccessException ex) {
@@ -159,7 +159,7 @@ public final class ReflectionHelper {
      *
      * @param  clazz      the class to introspect
      * @param  name       the name of the method
-     * @param  paramTypes the parameter types of the method (may be {@code null} to indicate any signature)
+     * @param  paramTypes the parameter types of the method (maybe {@code null} to indicate any signature)
      * @return            the Method object, or {@code null} if none found
      */
     public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
@@ -207,7 +207,7 @@ public final class ReflectionHelper {
 
     public static void setField(Field f, Object instance, Object value) {
         try {
-            boolean oldAccessible = f.isAccessible();
+            boolean oldAccessible = f.canAccess(instance);
             boolean shouldSetAccessible = !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
             if (shouldSetAccessible) {
                 f.setAccessible(true);
@@ -223,7 +223,7 @@ public final class ReflectionHelper {
 
     public static Object getField(Field f, Object instance) {
         try {
-            boolean oldAccessible = f.isAccessible();
+            boolean oldAccessible = f.canAccess(instance);
             boolean shouldSetAccessible = !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
             if (shouldSetAccessible) {
                 f.setAccessible(true);
diff --git a/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/srcgen/JavaClass.java b/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/srcgen/JavaClass.java
index 4ebf5b2707c..ce8370f1903 100644
--- a/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/srcgen/JavaClass.java
+++ b/tooling/camel-tooling-util/src/main/java/org/apache/camel/tooling/util/srcgen/JavaClass.java
@@ -157,18 +157,17 @@ public class JavaClass {
     public Annotation addAnnotation(String type) {
         try {
             Class<?> cl = getClassLoader().loadClass(type);
-            return addAnnotation(cl);
+            return addAnnotation((Class<? extends java.lang.annotation.Annotation>) cl);
         } catch (ClassNotFoundException e) {
             throw new IllegalArgumentException("Unable to parse type", e);
         }
     }
 
-    public Annotation addAnnotation(Class<?> type) {
+    public <A extends java.lang.annotation.Annotation> Annotation addAnnotation(Class<A> type) {
         if (!java.lang.annotation.Annotation.class.isAssignableFrom(type)) {
             throw new IllegalStateException("Not an annotation: " + type.getName());
         }
-        @SuppressWarnings("unchecked")
-        Annotation ann = new Annotation((Class) type);
+        Annotation ann = new Annotation(type);
         annotations.add(ann);
         return ann;
     }
@@ -439,7 +438,7 @@ public class JavaClass {
         }
     }
 
-    private void addImports(Set<String> imports, Class clazz) {
+    private void addImports(Set<String> imports, Class<?> clazz) {
         if (clazz != null) {
             if (clazz.isArray()) {
                 addImports(imports, clazz.getComponentType());
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
index de8e87dd8b6..d47ee13d8d9 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
@@ -88,7 +88,7 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
         setCompileSourceRoots();
 
         // load proxy class and get enumeration file to generate
-        final Class proxyType = getProxyType();
+        final Class<?> proxyType = getProxyType();
 
         // parse pattern for excluded endpoint properties
         if (excludeConfigNames != null) {
@@ -99,7 +99,7 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
         }
 
         // create parser
-        ApiMethodParser parser = createAdapterParser(proxyType);
+        ApiMethodParser<?> parser = createAdapterParser(proxyType);
 
         List<String> signatures = new ArrayList<>();
         Map<String, Map<String, String>> parameters = new HashMap<>();
@@ -125,7 +125,6 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
         parser.setClassLoader(getProjectClassLoader());
 
         // parse signatures
-        @SuppressWarnings("unchecked")
         final List<ApiMethodParser.ApiMethodModel> models = parser.parse();
 
         // generate enumeration from model
@@ -142,9 +141,8 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
         }
     }
 
-    @SuppressWarnings("unchecked")
-    protected ApiMethodParser createAdapterParser(Class proxyType) {
-        return new ArgumentSubstitutionParser(proxyType, getArgumentSubstitutions());
+    protected ApiMethodParser<?> createAdapterParser(Class<?> proxyType) {
+        return new ArgumentSubstitutionParser<>(proxyType, getArgumentSubstitutions());
     }
 
     public abstract List<SignatureModel> getSignatureList() throws MojoExecutionException;
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/AbstractGeneratorMojoTest.java b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/AbstractGeneratorMojoTest.java
index 9ac6453a279..f86b266c0e6 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/AbstractGeneratorMojoTest.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/AbstractGeneratorMojoTest.java
@@ -64,8 +64,8 @@ public abstract class AbstractGeneratorMojoTest {
         mojo.componentPackage = COMPONENT_PACKAGE;
         mojo.project = new MavenProject((Model) null) {
             @Override
-            public List getTestClasspathElements() {
-                return Collections.EMPTY_LIST;
+            public List<String> getTestClasspathElements() {
+                return Collections.emptyList();
             }
 
             @Override
@@ -103,7 +103,6 @@ public abstract class AbstractGeneratorMojoTest {
     }
 
     @Test
-    @SuppressWarnings("unchecked")
     public void shouldAddCompilationRootsByDefault() throws Exception {
         AbstractSourceGeneratorMojo mojo = createGeneratorMojo();
         assumeTrue(mojo != null, "Ignored because createGeneratorMojo is not implemented");
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/CamelSpringNamespace.java b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/CamelSpringNamespace.java
index b2cde7fb407..fdfbaf31082 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/CamelSpringNamespace.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/CamelSpringNamespace.java
@@ -42,7 +42,7 @@ public class CamelSpringNamespace implements NamespaceContext {
     }
 
     @Override
-    public Iterator getPrefixes(String namespaceURI) {
+    public Iterator<String> getPrefixes(String namespaceURI) {
         throw new UnsupportedOperationException("Operation not supported");
     }
 }
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
index 5556991f853..639e676aedb 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
@@ -152,7 +152,7 @@ public class RunMojo extends AbstractExecMojo {
     private ArtifactRepository localRepository;
 
     @Parameter(property = "project.remoteArtifactRepositories")
-    private List remoteRepositories;
+    private List<ArtifactRepository> remoteRepositories;
 
     @Component
     private MavenProjectBuilder projectBuilder;
@@ -299,7 +299,7 @@ public class RunMojo extends AbstractExecMojo {
 
         String skip = System.getProperties().getProperty("maven.test.skip");
         if (skip == null || "false".equals(skip)) {
-            // lets log a INFO about how to skip tests if you want to so you can run faster
+            // lets log a INFO about how to skip tests if you want to, so you can run faster
             getLog().info("You can skip tests from the command line using: mvn " + goal() + " -Dmaven.test.skip=true");
         }
 
@@ -966,7 +966,7 @@ public class RunMojo extends AbstractExecMojo {
                     this.remoteRepositories,
                     this.localRepository);
 
-            // get all of the dependencies for the executable project
+            // get all the dependencies for the executable project
             List<Dependency> dependencies = executableProject.getDependencies();
 
             // make Artifacts of all the dependencies
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AbstractGenerateConfigurerMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AbstractGenerateConfigurerMojo.java
index 13be071e5d3..3174330b105 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AbstractGenerateConfigurerMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AbstractGenerateConfigurerMojo.java
@@ -94,7 +94,7 @@ public abstract class AbstractGenerateConfigurerMojo extends AbstractGeneratorMo
 
         private boolean builderMethod;
 
-        public ConfigurerOption(String name, Class type, String getter, boolean builderMethod) {
+        public ConfigurerOption(String name, Class<?> type, String getter, boolean builderMethod) {
             // we just use name, type
             setName(name);
             if (byte[].class == type) {
@@ -167,7 +167,7 @@ public abstract class AbstractGenerateConfigurerMojo extends AbstractGeneratorMo
             Index index = readJandexIndex(project);
             for (String clazz : classes) {
                 ClassInfo ci = index.getClassByName(DotName.createSimple(clazz));
-                AnnotationInstance ai = ci != null ? ci.classAnnotation(CONFIGURER) : null;
+                AnnotationInstance ai = ci != null ? ci.declaredAnnotation(CONFIGURER) : null;
                 if (ai != null) {
                     addToSets(ai, bootstrapAndExtendedSet, clazz, bootstrapSet, extendedSet, set);
                 } else {
@@ -340,7 +340,7 @@ public abstract class AbstractGenerateConfigurerMojo extends AbstractGeneratorMo
         // filter out duplicates by using a names set that has already added
         Set<String> names = new HashSet<>();
 
-        Class clazz = projectClassLoader.loadClass(fqn);
+        Class<?> clazz = projectClassLoader.loadClass(fqn);
         // find all public setters
         doWithMethods(clazz, m -> {
             boolean deprecated = m.isAnnotationPresent(Deprecated.class);
@@ -360,14 +360,14 @@ public abstract class AbstractGenerateConfigurerMojo extends AbstractGeneratorMo
                 String getter = "get" + (builder
                         ? Character.toUpperCase(m.getName().charAt(4)) + m.getName().substring(5)
                         : Character.toUpperCase(m.getName().charAt(3)) + m.getName().substring(4));
-                Class type = m.getParameterTypes()[0];
+                Class<?> type = m.getParameterTypes()[0];
                 if (boolean.class == type || Boolean.class == type) {
                     try {
                         String isGetter = "is" + getter.substring(3);
                         clazz.getMethod(isGetter, null);
                         getter = isGetter;
                     } catch (Exception e) {
-                        // ignore as its then assumed to be get
+                        // ignore as its then assumed to get
                     }
                 }
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/DynamicClassLoader.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/DynamicClassLoader.java
index 13dd6c107f8..954287e7427 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/DynamicClassLoader.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/DynamicClassLoader.java
@@ -56,11 +56,11 @@ class DynamicClassLoader extends URLClassLoader {
         return new DynamicClassLoader(urls, tccl != null ? tccl : DynamicClassLoader.class.getClassLoader());
     }
 
-    public Class defineClass(String name, byte[] data) {
+    public Class<?> defineClass(String name, byte[] data) {
         return super.defineClass(name, data, 0, data.length);
     }
 
-    public Class generateDummyClass(String clazzName) {
+    public Class<?> generateDummyClass(String clazzName) {
         try {
             return loadClass(clazzName);
         } catch (ClassNotFoundException e) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
index 8232d050f95..1a42ba34dd6 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
@@ -888,25 +888,24 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
                 String sourceCode = loadText(file);
                 JavaClassSource source = (JavaClassSource) Roaster.parse(sourceCode);
                 // add existing methods
-                for (MethodSource ms : source.getMethods()) {
+                for (MethodSource<?> ms : source.getMethods()) {
                     boolean exist = methods.stream().anyMatch(
                             m -> m.getName().equals(ms.getName()) && m.getParameters().size() == ms.getParameters().size());
                     if (!exist) {
-                        // the existing file has a method we dont have so create a method and add
+                        // the existing file has a method we don't have, so create a method and add
                         Method method = new Method();
                         if (ms.isStatic()) {
                             method.setStatic();
                         }
                         method.setPublic();
                         method.setName(ms.getName());
-                        // roaster dont preserve the message body with nicely formatted space after comma
+                        // roaster don't preserve the message body with nicely formatted space after comma
                         String body = ms.getBody();
                         body = COMMA_PRESERVER_PATTERN.matcher(body).replaceAll(", $1");
                         method.setBody(body);
                         method.setReturnType(getQualifiedType(ms.getReturnType()));
                         for (Object o : ms.getParameters()) {
-                            if (o instanceof ParameterSource) {
-                                ParameterSource ps = (ParameterSource) o;
+                            if (o instanceof ParameterSource<?> ps) {
                                 method.addParameter(getQualifiedType(ps.getType()), ps.getName());
                             }
                         }
@@ -945,7 +944,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
                 endpointFactoriesPackageName.replace(".", "/"), "StaticEndpointBuilders.java");
     }
 
-    private static String getQualifiedType(Type type) {
+    private static String getQualifiedType(Type<?> type) {
         String val = type.getQualifiedName();
         if (val.startsWith("java.lang.")) {
             val = val.substring(10);
@@ -954,7 +953,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
     }
 
     @Deprecated
-    protected static String extractJavaDoc(String sourceCode, MethodSource ms) throws IOException {
+    protected static String extractJavaDoc(String sourceCode, MethodSource<?> ms) throws IOException {
         return JavadocUtil.extractJavaDoc(sourceCode, ms);
     }
 
@@ -969,7 +968,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
         }
 
         // load components
-        return Arrays.stream(files).sorted().collect(Collectors.toUnmodifiableList());
+        return Arrays.stream(files).sorted().toList();
     }
 
     private static String camelCaseLower(String s) {
@@ -1013,7 +1012,7 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
         return getComponentNameFromType(type) + "EndpointBuilder";
     }
 
-    private Class generateDummyClass(String clazzName) {
+    private Class<?> generateDummyClass(String clazzName) {
         return getProjectClassLoader().generateDummyClass(clazzName);
     }
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java
index 795b189e067..182c1d8eb3b 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java
@@ -156,7 +156,7 @@ public class EndpointSchemaGeneratorMojo extends AbstractGeneratorMojo {
         // make sure we sort the classes in case one inherit from the other
         classes.sort(this::compareClasses);
 
-        Map<Class, ComponentModel> models = new HashMap<>();
+        Map<Class<?>, ComponentModel> models = new HashMap<>();
         for (Class<?> classElement : classes) {
             UriEndpoint uriEndpoint = classElement.getAnnotation(UriEndpoint.class);
             String scheme = uriEndpoint.scheme();
@@ -183,7 +183,8 @@ public class EndpointSchemaGeneratorMojo extends AbstractGeneratorMojo {
     }
 
     private void processSchemas(
-            Map<Class, ComponentModel> models, Class<?> classElement, UriEndpoint uriEndpoint, String label, String[] schemes,
+            Map<Class<?>, ComponentModel> models, Class<?> classElement, UriEndpoint uriEndpoint, String label,
+            String[] schemes,
             String[] titles, String[] extendsSchemes) {
         for (int i = 0; i < schemes.length; i++) {
             final String alias = schemes[i];
@@ -205,7 +206,7 @@ public class EndpointSchemaGeneratorMojo extends AbstractGeneratorMojo {
         }
     }
 
-    private ComponentModel collectParentData(Map<Class, ComponentModel> models, Class<?> classElement) {
+    private ComponentModel collectParentData(Map<Class<?>, ComponentModel> models, Class<?> classElement) {
         ComponentModel parentData = null;
         final Class<?> superclass = classElement.getSuperclass();
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
index 8dc71fba565..1129d02bc79 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
@@ -75,7 +75,7 @@ public class PrepareCamelMainMojo extends AbstractGeneratorMojo {
         // filter out final or static fields
         fields = fields.stream().filter(f -> !f.isFinal() && !f.isStatic()).collect(Collectors.toList());
         fields.forEach(f -> {
-            AnnotationSource as = f.getAnnotation(Metadata.class);
+            AnnotationSource<?> as = f.getAnnotation(Metadata.class);
             String name = f.getName();
             String javaType = f.getType().getQualifiedName();
             String sourceType = clazz.getQualifiedName();
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareKameletMainMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareKameletMainMojo.java
index a3257178592..2804572df52 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareKameletMainMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareKameletMainMojo.java
@@ -81,7 +81,6 @@ public class PrepareKameletMainMojo extends AbstractMojo {
     @Parameter(defaultValue = "src/generated/")
     protected File genDir;
 
-    private Collection<Path> allJsonFiles;
     private final Map<Path, BaseModel<?>> allModels = new HashMap<>();
     private transient String licenseHeader;
 
@@ -101,7 +100,7 @@ public class PrepareKameletMainMojo extends AbstractMojo {
     }
 
     protected void updateKnownDependencies() throws Exception {
-        allJsonFiles = new TreeSet<>();
+        Collection<Path> allJsonFiles = new TreeSet<>();
 
         File path = new File(catalogDir, "src/generated/resources/org/apache/camel/catalog/components");
         for (File p : path.listFiles()) {
@@ -119,7 +118,7 @@ public class PrepareKameletMainMojo extends AbstractMojo {
         }
 
         List<String> lines = new ArrayList<>();
-        for (BaseModel model : allModels.values()) {
+        for (BaseModel<?> model : allModels.values()) {
             String fqn = model.getJavaType();
             if (model instanceof ArtifactModel) {
                 String aid = ((ArtifactModel<?>) model).getArtifactId();
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/XRefCheckMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/XRefCheckMojo.java
index af75908208b..fbb12ca2fc3 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/XRefCheckMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/XRefCheckMojo.java
@@ -70,7 +70,7 @@ public class XRefCheckMojo extends AbstractMojo {
         try (Reader r = Files.newBufferedReader(path.resolve(PLAYBOOK))) {
             site = (Map) yaml.loadFromReader(r);
         }
-        Map<String, String> attributes = (Map) ((Map) site.get("asciidoc")).get("attributes");
+        Map<String, String> attributes = (Map<String, String>) ((Map) site.get("asciidoc")).get("attributes");
         if (attributes != null) {
             attributes = attributes.entrySet().stream()
                     .collect(Collectors.toMap(e -> "{" + e.getKey() + "}", Map.Entry::getValue));
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java
index 005e055d358..f15d3c1c401 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java
@@ -138,16 +138,13 @@ public final class ClassUtil {
      * @return      class type for given type
      */
     public static Class<?> getClazz(Type type) {
-        if (type instanceof ParameterizedType) {
-            ParameterizedType pt = (ParameterizedType) type;
+        if (type instanceof ParameterizedType pt) {
             return (Class<?>) pt.getRawType();
         } else if (type instanceof Class) {
             return (Class<?>) type;
-        } else if (type instanceof GenericArrayType) {
-            GenericArrayType arrayType = (GenericArrayType) type;
+        } else if (type instanceof GenericArrayType arrayType) {
             return Array.newInstance(getClazz(arrayType.getGenericComponentType()), 0).getClass();
-        } else if (type instanceof WildcardType) {
-            WildcardType wildcardType = (WildcardType) type;
+        } else if (type instanceof WildcardType wildcardType) {
             Type[] bounds = wildcardType.getUpperBounds();
             if (bounds.length > 1) {
                 throw new IllegalArgumentException(
@@ -157,8 +154,7 @@ public final class ClassUtil {
             } else {
                 return getClass(bounds[0]);
             }
-        } else if (type instanceof TypeVariable) {
-            TypeVariable<?> typeVariable = (TypeVariable<?>) type;
+        } else if (type instanceof TypeVariable<?> typeVariable) {
             if (typeVariable.getBounds().length > 1) {
                 throw new IllegalArgumentException("Illegal use of type variable with more than one bound: " + typeVariable);
             } else {
@@ -175,8 +171,8 @@ public final class ClassUtil {
     }
 
     public static boolean isRawClassEquals(Type ipType, Type apiType) {
-        Class ipClass = getRawPrimitiveType(ipType);
-        Class apiClass = getRawPrimitiveType(apiType);
+        Class<?> ipClass = getRawPrimitiveType(ipType);
+        Class<?> apiClass = getRawPrimitiveType(apiType);
 
         if (ipClass == null || apiClass == null) {
             // we found some illegal generics
@@ -186,12 +182,12 @@ public final class ClassUtil {
         return ipClass.equals(apiClass);
     }
 
-    private static Class getRawPrimitiveType(Type type) {
-        if (type instanceof Class) {
-            if (((Class) type).isPrimitive()) {
-                return getPrimitiveWrapper((Class) type);
+    private static Class<?> getRawPrimitiveType(Type type) {
+        if (type instanceof Class<?> clazz) {
+            if (clazz.isPrimitive()) {
+                return getPrimitiveWrapper(clazz);
             }
-            return (Class) type;
+            return clazz;
         }
 
         if (type instanceof ParameterizedType) {
@@ -211,7 +207,6 @@ public final class ClassUtil {
     public static boolean hasAnnotation(String fqAnnotationName, Class<?> cl) {
         return Stream.of(cl.getAnnotations())
                 .map(annotation -> annotation.annotationType().getName())
-                .filter(fqAnnotationName::equals)
-                .findFirst().isPresent();
+                .anyMatch(fqAnnotationName::equals);
     }
 }
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/JavadocUtil.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/JavadocUtil.java
index 1467992c867..cac8fdb677f 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/JavadocUtil.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/JavadocUtil.java
@@ -97,7 +97,7 @@ public final class JavadocUtil {
         }
     }
 
-    public static String extractJavaDoc(String sourceCode, MethodSource ms) throws IOException {
+    public static String extractJavaDoc(String sourceCode, MethodSource<?> ms) throws IOException {
         // the javadoc is mangled by roaster (sadly it does not preserve newlines and original formatting)
         // so we need to load it from the original source file
         Object internal = ms.getJavaDoc().getInternal();
diff --git a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/AbstractGenerateMojo.java b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/AbstractGenerateMojo.java
index b2f4bca61e6..3834aadda1b 100644
--- a/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/AbstractGenerateMojo.java
+++ b/tooling/maven/camel-restdsl-openapi-plugin/src/main/java/org/apache/camel/maven/generator/openapi/AbstractGenerateMojo.java
@@ -351,7 +351,7 @@ abstract class AbstractGenerateMojo extends AbstractMojo {
             LoaderOptions options = new LoaderOptions();
             options.setTagInspector(new TrustedTagInspector());
             Yaml loader = new Yaml(new SafeConstructor(options));
-            Map map = loader.load(is);
+            Map<?, ?> map = loader.load(is);
             JsonNode node = mapper.convertValue(map, JsonNode.class);
             return (OasDocument) Library.readDocument(node);
         } else {