smongiar commented on PR #23781:
URL: https://github.com/apache/camel/pull/23781#issuecomment-4630339562

   > After these changes, is `RuntimeType.KAMELETS_VERSION` needed? I think so, 
I found it in `CatalogKamelet` and `CatalogDoc` can you investigate if these 
classes need to be updated as well?
   
   `RuntimeType.KAMELETS_VERSION` is still needed, it's used by 
VersionHelper.extractKameletsVersion() when classpath detection fails. But I 
found another issue:  `defaultValue = RuntimeType.KAMELETS_VERSION`  eagerly 
set the field, making the classpath detection code path dead. 
   
   So, I updated the fix removing the defaultValue and field initializer, 
adding a null check that calls `VersionHelper.extractKameletsVersion()` which 
tries classpath first, then falls back to `RuntimeType.KAMELETS_VERSION`


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