Dhairya-007 opened a new pull request, #30096:
URL: https://github.com/apache/camel/pull/30096

   ## Problem
   
   The event-type header names its class by simple name only:
   
   ```java
   @Metadata(description = "The type of event received", javaType = "EventType")
   String EVENT_TYPE = "CamelEhcacheEventType";
   ```
   
   `EventType` is `org.ehcache.event.EventType`, and `EventType` is one of the 
most reused simple names around - `camel-undertow` and `camel-spring-batch` 
each declare an `EventType` of their own - so the bare name says nothing about 
which enum's constants are valid here.
   
   It also costs the header its value list. The generator derives an `enum` 
list from a resolved enum class, so while the name stayed short the catalog 
published no values at all:
   
   ```json
   "CamelEhcacheEventType": { ..., "javaType": "EventType", ..., "description": 
"The type of event received" }
   ```
   
   After qualifying it, the five event types a consumer can actually receive 
are published:
   
   ```json
   "javaType": "org.ehcache.event.EventType",
   "enum": [ "EVICTED", "EXPIRED", "REMOVED", "CREATED", "UPDATED" ]
   ```
   
   which matters because this header is how a route tells the five Ehcache 
events apart, and the names were previously only discoverable from the Ehcache 
javadoc.
   
   Fully qualified is the convention by a wide margin across the catalog: 3692 
header `javaType` values are fully qualified or a built-in type, and 151 are 
not.
   
   ## Fix
   
   Qualify it to `org.ehcache.event.EventType`, the FQN the component's own 
sources import. The header name is untouched.
   
   Metadata only - no behaviour change. I diffed the regenerated catalog file 
against `main`: the only differences are this `javaType` and the `enum` list 
appearing beside it.
   


-- 
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]

Reply via email to