jbonofre commented on PR #741: URL: https://github.com/apache/camel-karaf/pull/741#issuecomment-5499385526
@oscerd I pushed to this branch directly rather than waiting on a round trip — sorry for stepping on your PR, revert me if you disagree with any of it. Kept you as the commit author. It is rebased on current `main` as well. Summary of what changed relative to your revision: - **Kept the `break`.** Selection semantics and the cost of the scan are exactly as before. - **Dropped the duplicate-provider WARN.** It fires on a stock install: the default `camel-core` feature installs both `camel-xml-io` and `camel-xml-jaxb` and both ship `META-INF/services/org/apache/camel/modelxml-dumper`, with different implementation classes. And it could not see the #733 rolling-upgrade sequence anyway, since `addToClassMap` short-circuits on `classMap` and never calls `getResource` again for a resolved key. - **Kept and centred the robustness fix** your `getEntry` loop exposed: skip `Bundle.UNINSTALLED`, and catch `IllegalStateException` from `getEntry`. That one is a real bug on its own — a `feature:uninstall` racing a lookup poisons the key for the life of the context via `classesNotFoundExceptions` — and it is now what the PR is about. - **DEBUG instead of WARN** for which bundle supplied the descriptor. That is the "observable" half of #733 without the noise. - Tests extended to 6 cases, including the two uninstalled-bundle races. Also fixed the missing newline at EOF and the stray blank lines. I am leaving #733 open: the sticky-cache half is untouched here and needs invalidation on bundle events, along the lines of what `OsgiTypeConverter` does with its delegate. Happy to look at that separately if you want to take it. --- _Claude Code on behalf of JB Onofré_ -- 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]
