gnodet-bot commented on code in PR #30340: URL: https://github.com/apache/camel/pull/30340#discussion_r4627055530
########## core/camel-core/src/test/java/org/apache/camel/processor/DynamicEndpointMessageOptionLiteralTest.java: ########## @@ -0,0 +1,329 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.processor; + +import java.util.Map; +import java.util.Properties; + +import org.apache.camel.CamelContext; +import org.apache.camel.Consumer; +import org.apache.camel.ContextTestSupport; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Header; +import org.apache.camel.PollingConsumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.builder.AggregationStrategies; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.support.DefaultComponent; +import org.apache.camel.support.DefaultEndpoint; +import org.apache.camel.support.DefaultProducer; +import org.apache.camel.support.PollingConsumerSupport; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Companion to {@link DynamicEndpointMessagePlaceholderTest}: the per-message recipient of the dynamic-uri EIPs is + * computed from the message, so its query option values are also treated as literal text. A property-placeholder token + * ({@code {{...}}}) or a bean/class reference token ({@code #class:}, {@code #bean:}, {@code #type:}) that appears in a + * runtime-computed option value is kept verbatim: it is neither resolved, nor is any class instantiated or bean looked Review Comment: 📝 **Doc inconsistency (missed by dcc28190):** This class-level Javadoc says `#bean:` and `#type:` are "kept verbatim: it is neither resolved, nor is any class instantiated or bean looked up" — but `toDOptionBeanReferenceStillResolves` asserts the opposite: `assertThat(SinkEndpoint.lastOption).isSameAs(context.getRegistry().lookupByName("marker"))`. All 8 production files updated by dcc28190 correctly state that `#bean:`/`#type:` registry references still resolve; this test-class Javadoc was missed. ```suggestion * Companion to {@link DynamicEndpointMessagePlaceholderTest}: the per-message recipient of the dynamic-uri EIPs is * computed from the message, so its query option values are also treated as literal text. A property-placeholder token * ({@code {{...}}}), a {@code #class:} or {@code #property:} reference in a runtime-computed option value is kept * verbatim (not resolved). Plain registry references ({@code #bean:}, {@code #type:}) are still resolved. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
