Issue Details (XML | Word | Printable)

Key: XW-527
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Rainer Hermanns
Reporter: zhouyanming
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XWork

CreateIfNull doesn't works

Created: 11/Jun/07 04:30 AM   Updated: 16/Jul/07 10:45 AM
Component/s: Type Conversion
Affects Version/s: 2.0.3
Fix Version/s: 2.0.4, 2.1

Environment: jdk-1.5.0_11,eclipse-3.2,xwork-2.0.3,ognl-2.6.11

Flags: Important


 Description  « Hide
in com.opensymphony.xwork2.util.XWorkListPropertyAccessor,line 42

if (name instanceof Number
                && OgnlContextState.isCreatingNullObjects(context)
                && XWorkConverter.getInstance()
                .getObjectTypeDeterminer().shouldCreateIfNew(lastClass,lastProperty,target,null,true)) {
                .......
}

"OgnlContextState.isCreatingNullObjects(context)" is aways false,if I add "OgnlContextState.setCreatingNullObjects(context, true);",It cause NPE when "ObjectFactory.getObjectFactory().buildBean(beanClass, context)"


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
zhouyanming added a comment - 11/Jun/07 04:39 AM
xwork-2.0.2 works fine

zhouyanming added a comment - 17/Jun/07 11:59 PM
I think I found where the problem is,com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory.instance was set to DefaultObjectTypeDeterminer,then set to GenericsObjectTypeDeterminer if exists,and set to DefaultObjectTypeDeterminer again,why?

Rainer Hermanns added a comment - 16/Jul/07 10:45 AM
fixed in SVN