davsclaus commented on code in PR #27143:
URL: https://github.com/apache/camel/pull/27143#discussion_r4147289831
##########
core/camel-core-model/src/main/java/org/apache/camel/model/SwitchCaseDefinition.java:
##########
@@ -120,11 +141,11 @@ public String getShortName() {
@Override
public String getLabel() {
- return "case[" + value + "]";
+ return "case[" + value + " -> " +
URISupport.sanitizeUri(getEndpointUri()) + "]";
Review Comment:
Minor: with an endpoint builder, `getEndpointUri()` calls
`builder.getRawUri()` on every `getLabel()` call. `SendDefinition.getLabel()`
guards the same call with a try/catch for `RuntimeException` and caches the
sanitized value. Consider mirroring that for consistency (not a known bug).
##########
core/camel-core-model/src/main/java/org/apache/camel/model/SwitchDefinition.java:
##########
@@ -28,12 +28,15 @@
import org.apache.camel.Expression;
import org.apache.camel.NamedNode;
+import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.ExpressionClause;
import org.apache.camel.model.language.ExpressionDefinition;
+import org.apache.camel.spi.AsEndpointUri;
import org.apache.camel.spi.Metadata;
/** Routes a message to one fixed endpoint using a literal lookup table. */
@Metadata(firstVersion = "4.23.0", label = "eip,routing",
+ aliases = { "decision-table", "dispatch-table", "lookup-table",
"case" },
Review Comment:
Minor: `case` is also the name of the `case` model in the catalog
(`models/case.json`). The other aliases here and on existing EIPs are synonyms
(choice: `router`/`dispatch`, loop: `iterate`), whereas this one makes a lookup
for "case" land on `switch` rather than the `case` model. The test relies on
it, so it is probably intended. Just flagging it in case catalog term lookup
should keep resolving model names first.
--
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]