[SPRNET-1409] Bug in MethodParametersCriteria.IsSatisfied() Method Created: 20/Dec/10  Updated: 04/Jan/11  Resolved: 04/Jan/11

Status: Resolved
Project: Spring.NET
Component/s: Spring-NET-CORE
Affects Version/s: 1.3.1
Fix Version/s: 2.0 M1

Type: Bug Priority: Major
Reporter: Marcus Chou Assignee: Steve Bohlen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MethodParametersCriteria.cs    
Reference URL: http://forum.springframework.net/showthread.php?t=7407

 Description   

It seems like a bug exists in the MethodParametersCriteria.IsStatisfied(object) method. The method looks to return true as long as the last parameter being checked against the target type is the same, ignoring all previous parameters.

So if I'm trying to find a method foo(string, Guid), the satisfied boolean would return true for foo(Guid, Guid) as well.

File with what I believe should be the correct implementation of the IsSatisfied() method is attached.



 Comments   
Comment by Steve Bohlen [ 04/Jan/11 ]

Good catch – the existing logic is indeed just plain wrong. Fix applied and test added to confirm proper behavior.

Generated at Mon Jul 15 22:09:30 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.