struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty (JIRA)" <>
Subject [jira] [Created] (WW-4411) OgnlValueStackTest issues
Date Thu, 02 Oct 2014 17:58:34 GMT
Martin Gainty created WW-4411:

             Summary: OgnlValueStackTest issues
                 Key: WW-4411
             Project: Struts 2
          Issue Type: Bug
          Components: Value Stack
    Affects Versions: 2.3.4
         Environment: Downloaded Struts 2.3.4
JDK 1.7.0_45
Maven 3.1.1
            Reporter: Martin Gainty
            Priority: Minor
             Fix For: Future

Downloaded Struts 2.3.4 last week and ran into alot of issues with com.opensymphony.xwork2.ognl.OgnlValueStackTest
setValue /Ognl findValue 
Background:: accessing objects the 'Ognl hierarchy' I always found what i was looking for
Foo foo=new Foo();
Dog dog = new Dog();
vs.setValue("foo", foo);
Object o=vs.findValue("Foo.Dog") //returns dog object embedded in foo
if(o instanceof Dog) //always true no problem here
  Dog dog=(Dog)o; //Cast is correct without errors or exceptions
but failure when using OGNL to access orphaned objects e.g.
    public void testDoesNotFailOnNonActionObjects() {
//if a value is not found, then it will check for missing properties
//it needs to check in all objects in the stack, not only actions, see //WW-3306
        OgnlValueStack vs = createValueStack();
        Dog dog = new Dog();
        vs.push(dog); //dog is set into vs
        Object o =vs.findValue("hates"); //o returns null
Has anyone been able to run OgnlValueStackTest w/o failures and errors recently?

This message was sent by Atlassian JIRA

View raw message