Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.2
-
Fix Version/s: 2.9
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
Test-Driven is one thing, but without pairing its imperfect. A pairing partner would have picked up this obvious error in the testcase
The FactoryInjector subclass is a neat design, but the Type that is passed in to the method you have to implement is not the type of the class you would be injecting into. Instead it is the type of the required class (which is useless).
Here is a patch that solves the problem. It sadly introduces a new getComponent() signature. Jörg was right I guess - the FactoryInjector addition change might have been a bit big to consider suitable for a 2.x release.
Please take a look folks and let me know if you can make a more backwards compatible patch.
The patch also introduces (in gems) new FactoryInjector implementations for Log4J, Clogging and SLF4J. They serve as additional proofs that the patch works.