You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/09/14 18:49:00 UTC
[jira] [Closed] (WW-4411) OgnlValueStackTest issues
[ https://issues.apache.org/jira/browse/WW-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart closed WW-4411.
-----------------------------
Resolution: Won't Fix
> OgnlValueStackTest issues
> -------------------------
>
> Key: WW-4411
> URL: https://issues.apache.org/jira/browse/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: 6.1.0
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> 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-
--
This message was sent by Atlassian Jira
(v8.20.10#820010)