[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1252) SeamTest invokeMethod() breaks jboss-el: "Parameter types cannot be null"

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Apr 26 08:53:30 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1252?page=all ]

Pete Muir updated JBSEAM-1252:
------------------------------

    Fix Version/s: 1.3.0.BETA1
         Assignee: Pete Muir

> SeamTest invokeMethod() breaks jboss-el: "Parameter types cannot be null"
> -------------------------------------------------------------------------
>
>                 Key: JBSEAM-1252
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1252
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.1.GA
>         Environment: Seam from CVS.  Jboss 4.2.0CR2.  Facelets and JSF RI
>            Reporter: Stuart Robertson
>         Assigned To: Pete Muir
>            Priority: Minor
>             Fix For: 1.3.0.BETA1
>
>
> SeamTest and MockApplication pass null as parameters to the MethodBinding.  Jboss-el throws if they are null, and expects a zero sized array.
> Here's an example of what breaks it:
>             invokeMethod("#{register.register}");
> Here's the exception thrown:
> FAILED: registerTest
> java.lang.NullPointerException: Parameter types cannot be null
> 	at org.jboss.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:53)
> 	at org.jboss.seam.util.UnifiedELMethodBinding.<init>(UnifiedELMethodBinding.java:18)
> 	at org.jboss.seam.mock.MockApplication.createMethodBinding(MockApplication.java:270)
> 	at org.jboss.seam.jsf.SeamApplication.createMethodBinding(SeamApplication.java:291)
> 	at org.jboss.seam.mock.SeamTest$Request.invokeMethod(SeamTest.java:400)
> 	at com.fb.core.test.catalog.RegisterAndLoginTest$RegisterFacesRequest.invokeApplication(RegisterAndLoginTest.java:254)
> 	at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:488)
> 	at com.fb.core.test.catalog.RegisterAndLoginTest.registerTest(RegisterAndLoginTest.java:55)
> Here's a patch that made the test run successfully:
> ### Eclipse Workspace Patch 1.0
> #P jboss-seam
> Index: src/main/org/jboss/seam/mock/SeamTest.java
> ===================================================================
> RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/mock/SeamTest.java,v
> retrieving revision 1.66
> diff -u -r1.66 SeamTest.java
> --- src/main/org/jboss/seam/mock/SeamTest.java	24 Apr 2007 02:32:58 -0000	1.66
> +++ src/main/org/jboss/seam/mock/SeamTest.java	26 Apr 2007 12:16:10 -0000
> @@ -397,7 +397,7 @@
>         */
>        protected Object invokeMethod(String methodExpression)
>        {
> -         return application.createMethodBinding(methodExpression, null).invoke(facesContext, null);
> +         return application.createMethodBinding(methodExpression, new Class [0]).invoke(facesContext, null);
>        }
>  
>        /**
> Though SeamTest would still not accept method expression parameters with this change.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list