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/10/09 15:02:21 UTC

[Bug 55642] New: TagPluginManager isConstantAttribute broken

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

            Bug ID: 55642
           Summary: TagPluginManager isConstantAttribute broken
           Product: Tomcat 7
           Version: 7.0.42
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: pavelcibulka@gmail.com

Function isConstantAttribute in TagPluginManager seems to be be broken.
For value "order.status" it returns false. And for value "${order.state.name}"
it returns true. According to javadoc it should be exact opposite.

Problem seems to be in Node.isLiteral function. "el!= null" should probably be
"el== null" But this function is being used elsewhere.


/**
* @return true if the attribute is specified and its value is a
*         translation-time constant.
*/
public boolean TagPluginManager.isConstantAttribute(String attribute){
    Node.JspAttribute attr = getNodeAttribute(attribute);
    if (attr == null)
        return false;
    return attr.isLiteral();
}
/**
* @return true if the value is a string literal known at translation
*         time.
*/
public boolean isLiteral() {
    return !expression && (el != null) && !namedAttribute;
}

-- 
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 55642] TagPluginManager isConstantAttribute broken

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

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

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

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
The function is being used elsewhere but it is returning the wrong value there
too.

I have fixed this in 8.0.x for 8.0.0-RC4 and 7.0.x for 7.0.46.

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