rzo1 commented on PR #48: URL: https://github.com/apache/geronimo-xbean/pull/48#issuecomment-3707272779
I’ve added some tests for the TomEE cases I encountered while testing the change. Additionally, the change from [this PR](https://github.com/apache/geronimo-xbean/pull/47) is required for all new test cases to pass. Here’s what I observed: With the initial change ``` boolean specifiedParameterTypes = parameterTypes != null; ``` which addresses a similar issue to XBEAN-350, we now encounter the same buggy behavior in findStaticFactory(...). The problem is that we cannot rely solely on the properties and ctor argument names, because sometimes these properties can be ignored and sometimes they cannot, depending on whether the option is specified or not. To handle this, I added a heuristic to select the "best" matching factory method when multiple factories are available (and the ignore missing properties option is specified). I’m not sure if this is the ideal approach, but when no parameter types are provided, we can only make an educated guess about the user’s intent. With these changes, combined with the updates from @jungm in #47, all TomEE tests pass, as well as all existing XBean tests. If we can live with that approach, it might be an idea to also add such heuristic to `findConstructor(....)` if the option ignore missing properties is specified. -- 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]
