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/08/17 15:39:06 UTC

[Bug 55442] New: EL Constructor throws exception

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

            Bug ID: 55442
           Summary: EL Constructor throws exception
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: dev@tomcat.apache.org
          Reporter: dmikusa@gopivotal.com

In the EL 3.0 Spec, section 1.22.3 "Constructor Reference"  states "A class
name reference, followed by arguments in parenthesis, such as "Boolean(true)"
denotes the invocation of the constructor of the class with the supplied
arguments."

This leads me to believe that the following test should work:

   @Test
   public void testImport03() {
       ELProcessor processor = new ELProcessor();
       Object result =
               processor.getValue("Integer('1000')",
                       Integer.class);
       Assert.assertEquals(Integer.valueOf(1000), result);
   }

Unfortunately, this fails with the following error.

javax.el.ELException: Function ':Integer' not found
    at org.apache.el.parser.AstFunction.getValue(AstFunction.java:136)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
    at javax.el.ELProcessor.getValue(ELProcessor.java:45)
    at
org.apache.el.parser.TestAstIdentifier.testImport03(TestAstIdentifier.java:53)
…

Thanks

-- 
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 55442] EL Constructor throws exception

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

Violeta Georgieva <vi...@apache.org> changed:

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

--- Comment #2 from Violeta Georgieva <vi...@apache.org> ---
Thanks for the report. 
Fix is available in trunk and will be in 8.0.0-RC2.

-- 
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 55442] EL Constructor throws exception

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

--- Comment #1 from Violeta Georgieva <vi...@apache.org> ---
According to the specification 

"1.5.2 Evaluating functions
The expression with the syntax func(args...)(args...)... can mean any of the
following.
...
- A call to the constructor of an imported class.
- A call to a static method that has been imported statically."

We need to handle these two cases also.

-- 
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