Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4411

OgnlValueStackTest issues

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.4
    • Fix Version/s: Future
    • Component/s: Value Stack
    • Labels:
      None
    • Environment:

      Downloaded Struts 2.3.4
      JDK 1.7.0_45
      Maven 3.1.1

      Description

      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 e.g.
      Foo foo=new Foo();
      Dog dog = new Dog();
      foo.setDog(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(); dog.setHates(null); 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?
      Thanks,
      Martin-

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mgainty@hotmail.com Martin Gainty
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 96h
                96h
                Remaining:
                Remaining Estimate - 96h
                96h
                Logged:
                Time Spent - Not Specified
                Not Specified