You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/01/03 15:20:38 UTC

[Bug 54370] New: NPE mapping method in EL

https://issues.apache.org/bugzilla/show_bug.cgi?id=54370

            Bug ID: 54370
           Summary: NPE mapping method in EL
           Product: Tomcat 7
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: remm@apache.org
    Classification: Unclassified

Created attachment 29808
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29808&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54370] NPE mapping method in EL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54370

--- Comment #4 from Remy Maucherat <re...@apache.org> ---
Thanks, very nice improvement.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54370] NPE mapping method in EL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54370

--- Comment #2 from Remy Maucherat <re...@apache.org> ---
(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).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54370] NPE mapping method in EL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54370

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54370] NPE mapping method in EL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54370

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org