Created attachment 29808 [details] Patch NPE when using null parameters in some cases: https://issues.jboss.org/browse/AS7-3177 I did put a workaround for it, but I don't know how legitimate it is. It looks a bit similar to the NPE with a null toString that got reverted, where a null object is used as an argument.
I think you have identified a problem but I'm not sure the proposed solution is correct. Treating a null as an exact match for a parameter seems wrong. I think it needs to be treated as a possible match. I'll work on some test cases.
(In reply to comment #1) > I think you have identified a problem but I'm not sure the proposed solution > is correct. Treating a null as an exact match for a parameter seems wrong. I > think it needs to be treated as a possible match. I'll work on some test > cases. I think it is suspicious too [like many one line patches], but even if it goes through ELSupport.coerceToType, I think null looks like it will always end up matching the expected type (unless I missed something).
It is the exact match part that is the problem. As soon as an exact match is find, Tomcat stops looking. With a null parameter type it needs to keep looking as it is only a possible match. Tomcat needs to ensure it is the only possible match and that there aren't ambiguous matches. I fixed this in trunk and 7.0.x and it will be included in 7.0.35 onwards.
Thanks, very nice improvement.