laeubi commented on PR #337: URL: https://github.com/apache/commons-logging/pull/337#issuecomment-2609997566
> Are you saying that tests like the Commons Compress example would not catch this kind of issue? I guess we can't know until a test exists... The commons compress test only the bundle itself, this issue you will only see when *different* bundles are used, e.g. to show the problem in this test you will need (or maybe similar): 1. this bundle in version 1.2 and 1.3 2. a bundle importing 1.2 api but 1.3 impl 3. a bundle using that bundle to emit a log message What then (if anything setup correctly) will happen is that it gets wired to 1.2 API but 1.3 impl and when the log message is issued you will see `java.lang.ClassCastException` somewhere logged (maybe on system out) and you hopefully can capture this in an assert. So rather complex and convoluted setup ... I don't say its impossible but I question the usefulness, because once the problem is solved you won't be able to run the test anymore because then the OSGi framework itself will not run the test anymore because it detects the problem before and refuses to start the bundles at all :-) -- 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]
